/* Generated by Cython 0.24 */

#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 < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_24"
#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
#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_CPYTHON 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
  #define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#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 > 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_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_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #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_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_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(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#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
#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
#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
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#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) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#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
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#ifndef CYTHON_INLINE
  #if 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 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


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

#if PY_MAJOR_VERSION >= 3
  #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

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

#define __PYX_HAVE__slepc4py__SLEPc
#define __PYX_HAVE_API__slepc4py__SLEPc
#include "slepc.h"
#include "petsc.h"
#include "custom.h"
#include "scalar.h"
#include "string.h"
#include "stdio.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#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_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#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) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _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 char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE 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_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((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)
#if PY_MAJOR_VERSION < 3
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);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#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)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
#if CYTHON_COMPILING_IN_CPYTHON
#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 PyObject *__pyx_m;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
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[] = {
  "SLEPc/ST.pyx",
  "SLEPc/allocate.pxi",
  "SLEPc/slepcbv.pxi",
  "SLEPc/BV.pyx",
  "SLEPc/SLEPc.pyx",
  "SLEPc/slepcmpi.pxi",
  "SLEPc/slepcsys.pxi",
  "SLEPc/slepcfn.pxi",
  "SLEPc/slepcnep.pxi",
  "SLEPc/Sys.pyx",
  "SLEPc/DS.pyx",
  "SLEPc/FN.pyx",
  "SLEPc/RG.pyx",
  "SLEPc/EPS.pyx",
  "SLEPc/SVD.pyx",
  "SLEPc/PEP.pyx",
  "SLEPc/NEP.pyx",
  "SLEPc/MFN.pyx",
  "SLEPc/CAPI.pyx",
  "slepc4py.SLEPc.pyx",
  "PETSc.pxd",
};

/*--- Type declarations ---*/
struct PyPetscCommObject;
struct PyPetscObjectObject;
struct PyPetscViewerObject;
struct PyPetscRandomObject;
struct PyPetscISObject;
struct PyPetscLGMapObject;
struct PyPetscSFObject;
struct PyPetscVecObject;
struct PyPetscScatterObject;
struct PyPetscSectionObject;
struct PyPetscMatObject;
struct PyPetscNullSpaceObject;
struct PyPetscPCObject;
struct PyPetscKSPObject;
struct PyPetscSNESObject;
struct PyPetscTSObject;
struct PyPetscTAOObject;
struct PyPetscAOObject;
struct PyPetscDMObject;
struct PyPetscPartitionerObject;
struct PySlepcSTObject;
struct PySlepcBVObject;
struct PySlepcDSObject;
struct PySlepcFNObject;
struct PySlepcRGObject;
struct PySlepcEPSObject;
struct PySlepcSVDObject;
struct PySlepcPEPObject;
struct PySlepcNEPObject;
struct PySlepcMFNObject;
struct __pyx_obj_8slepc4py_5SLEPc__p_mem;
struct __pyx_obj_8slepc4py_5SLEPc_Sys;

/* "petsc4py/PETSc.pxd":70
 * # --------------------------------------------------------------------
 * 
 * ctypedef public api class Comm [             # <<<<<<<<<<<<<<
 *     type   PyPetscComm_Type,
 *     object PyPetscCommObject,
 */
struct PyPetscCommObject {
  PyObject_HEAD
  MPI_Comm comm;
  int isdup;
  PyObject *base;
};
typedef struct PyPetscCommObject PyPetscCommObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscComm_Type;

/* "petsc4py/PETSc.pxd":78
 *     cdef object base
 * 
 * ctypedef public api class Object [             # <<<<<<<<<<<<<<
 *     type   PyPetscObject_Type,
 *     object PyPetscObjectObject,
 */
struct PyPetscObjectObject {
  PyObject_HEAD
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object *__pyx_vtab;
  PyObject *__weakref__;
  PyObject *__pyx___dummy__;
  PetscObject oval;
  PetscObject *obj;
};
typedef struct PyPetscObjectObject PyPetscObjectObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscObject_Type;

/* "petsc4py/PETSc.pxd":90
 *     cdef object get_dict(self)
 * 
 * ctypedef public api class Viewer(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscViewer_Type,
 *     object PyPetscViewerObject,
 */
struct PyPetscViewerObject {
  struct PyPetscObjectObject __pyx_base;
  PetscViewer vwr;
};
typedef struct PyPetscViewerObject PyPetscViewerObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscViewer_Type;

/* "petsc4py/PETSc.pxd":96
 *     cdef PetscViewer vwr
 * 
 * ctypedef public api class Random(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscRandom_Type,
 *     object PyPetscRandomObject,
 */
struct PyPetscRandomObject {
  struct PyPetscObjectObject __pyx_base;
  PetscRandom rnd;
};
typedef struct PyPetscRandomObject PyPetscRandomObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscRandom_Type;

/* "petsc4py/PETSc.pxd":102
 *     cdef PetscRandom rnd
 * 
 * ctypedef public api class IS(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscIS_Type,
 *     object PyPetscISObject,
 */
struct PyPetscISObject {
  struct PyPetscObjectObject __pyx_base;
  IS iset;
};
typedef struct PyPetscISObject PyPetscISObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscIS_Type;

/* "petsc4py/PETSc.pxd":108
 *     cdef PetscIS iset
 * 
 * ctypedef public api class LGMap(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscLGMap_Type,
 *     object PyPetscLGMapObject,
 */
struct PyPetscLGMapObject {
  struct PyPetscObjectObject __pyx_base;
  ISLocalToGlobalMapping lgm;
};
typedef struct PyPetscLGMapObject PyPetscLGMapObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscLGMap_Type;

/* "petsc4py/PETSc.pxd":114
 *     cdef PetscLGMap lgm
 * 
 * ctypedef public api class SF(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSF_Type,
 *     object PyPetscSFObject,
 */
struct PyPetscSFObject {
  struct PyPetscObjectObject __pyx_base;
  PetscSF sf;
};
typedef struct PyPetscSFObject PyPetscSFObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSF_Type;

/* "petsc4py/PETSc.pxd":120
 *     cdef PetscSF sf
 * 
 * ctypedef public api class Vec(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscVec_Type,
 *     object PyPetscVecObject,
 */
struct PyPetscVecObject {
  struct PyPetscObjectObject __pyx_base;
  Vec vec;
};
typedef struct PyPetscVecObject PyPetscVecObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscVec_Type;

/* "petsc4py/PETSc.pxd":126
 *     cdef PetscVec vec
 * 
 * ctypedef public api class Scatter(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscScatter_Type,
 *     object PyPetscScatterObject,
 */
struct PyPetscScatterObject {
  struct PyPetscObjectObject __pyx_base;
  VecScatter sct;
};
typedef struct PyPetscScatterObject PyPetscScatterObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscScatter_Type;

/* "petsc4py/PETSc.pxd":132
 *     cdef PetscScatter sct
 * 
 * ctypedef public api class Section(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSection_Type,
 *     object PyPetscSectionObject,
 */
struct PyPetscSectionObject {
  struct PyPetscObjectObject __pyx_base;
  PetscSection sec;
};
typedef struct PyPetscSectionObject PyPetscSectionObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSection_Type;

/* "petsc4py/PETSc.pxd":138
 *     cdef PetscSection sec
 * 
 * ctypedef public api class Mat(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscMat_Type,
 *     object PyPetscMatObject,
 */
struct PyPetscMatObject {
  struct PyPetscObjectObject __pyx_base;
  Mat mat;
};
typedef struct PyPetscMatObject PyPetscMatObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscMat_Type;

/* "petsc4py/PETSc.pxd":144
 *     cdef PetscMat mat
 * 
 * ctypedef public api class NullSpace(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscNullSpace_Type,
 *     object PyPetscNullSpaceObject,
 */
struct PyPetscNullSpaceObject {
  struct PyPetscObjectObject __pyx_base;
  MatNullSpace nsp;
};
typedef struct PyPetscNullSpaceObject PyPetscNullSpaceObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscNullSpace_Type;

/* "petsc4py/PETSc.pxd":150
 *     cdef PetscNullSpace nsp
 * 
 * ctypedef public api class PC(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscPC_Type,
 *     object PyPetscPCObject,
 */
struct PyPetscPCObject {
  struct PyPetscObjectObject __pyx_base;
  PC pc;
};
typedef struct PyPetscPCObject PyPetscPCObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPC_Type;

/* "petsc4py/PETSc.pxd":156
 *     cdef PetscPC pc
 * 
 * ctypedef public api class KSP(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscKSP_Type,
 *     object PyPetscKSPObject,
 */
struct PyPetscKSPObject {
  struct PyPetscObjectObject __pyx_base;
  KSP ksp;
};
typedef struct PyPetscKSPObject PyPetscKSPObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscKSP_Type;

/* "petsc4py/PETSc.pxd":162
 *     cdef PetscKSP ksp
 * 
 * ctypedef public api class SNES(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSNES_Type,
 *     object PyPetscSNESObject,
 */
struct PyPetscSNESObject {
  struct PyPetscObjectObject __pyx_base;
  SNES snes;
};
typedef struct PyPetscSNESObject PyPetscSNESObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSNES_Type;

/* "petsc4py/PETSc.pxd":168
 *     cdef PetscSNES snes
 * 
 * ctypedef public api class TS(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscTS_Type,
 *     object PyPetscTSObject,
 */
struct PyPetscTSObject {
  struct PyPetscObjectObject __pyx_base;
  TS ts;
};
typedef struct PyPetscTSObject PyPetscTSObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTS_Type;

/* "petsc4py/PETSc.pxd":174
 *     cdef PetscTS ts
 * 
 * ctypedef public api class TAO(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscTAO_Type,
 *     object PyPetscTAOObject,
 */
struct PyPetscTAOObject {
  struct PyPetscObjectObject __pyx_base;
  Tao tao;
};
typedef struct PyPetscTAOObject PyPetscTAOObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTAO_Type;

/* "petsc4py/PETSc.pxd":180
 *     cdef PetscTAO tao
 * 
 * ctypedef public api class AO(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscAO_Type,
 *     object PyPetscAOObject,
 */
struct PyPetscAOObject {
  struct PyPetscObjectObject __pyx_base;
  AO ao;
};
typedef struct PyPetscAOObject PyPetscAOObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscAO_Type;

/* "petsc4py/PETSc.pxd":186
 *     cdef PetscAO ao
 * 
 * ctypedef public api class DM(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscDM_Type,
 *     object PyPetscDMObject,
 */
struct PyPetscDMObject {
  struct PyPetscObjectObject __pyx_base;
  DM dm;
};
typedef struct PyPetscDMObject PyPetscDMObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDM_Type;

/* "petsc4py/PETSc.pxd":192
 *     cdef PetscDM dm
 * 
 * ctypedef public api class Partitioner(Object) [             # <<<<<<<<<<<<<<
 *     type PyPetscPartitioner_Type,
 *     object PyPetscPartitionerObject,
 */
struct PyPetscPartitionerObject {
  struct PyPetscObjectObject __pyx_base;
  PetscPartitioner part;
};
typedef struct PyPetscPartitionerObject PyPetscPartitionerObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPartitioner_Type;

/* "slepc4py/SLEPc.pxd":42
 * from petsc4py.PETSc cimport Object
 * 
 * ctypedef public api class ST(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcST_Type,
 *     object PySlepcSTObject,
 */
struct PySlepcSTObject {
  struct PyPetscObjectObject __pyx_base;
  ST st;
};
typedef struct PySlepcSTObject PySlepcSTObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcST_Type;

/* "slepc4py/SLEPc.pxd":48
 *     cdef SlepcST st
 * 
 * ctypedef public api class BV(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcBV_Type,
 *     object PySlepcBVObject,
 */
struct PySlepcBVObject {
  struct PyPetscObjectObject __pyx_base;
  BV bv;
};
typedef struct PySlepcBVObject PySlepcBVObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcBV_Type;

/* "slepc4py/SLEPc.pxd":54
 *     cdef SlepcBV bv
 * 
 * ctypedef public api class DS(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcDS_Type,
 *     object PySlepcDSObject,
 */
struct PySlepcDSObject {
  struct PyPetscObjectObject __pyx_base;
  DS ds;
};
typedef struct PySlepcDSObject PySlepcDSObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcDS_Type;

/* "slepc4py/SLEPc.pxd":60
 *     cdef SlepcDS ds
 * 
 * ctypedef public api class FN(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcFN_Type,
 *     object PySlepcFNObject,
 */
struct PySlepcFNObject {
  struct PyPetscObjectObject __pyx_base;
  FN fn;
};
typedef struct PySlepcFNObject PySlepcFNObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcFN_Type;

/* "slepc4py/SLEPc.pxd":66
 *     cdef SlepcFN fn
 * 
 * ctypedef public api class RG(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcRG_Type,
 *     object PySlepcRGObject,
 */
struct PySlepcRGObject {
  struct PyPetscObjectObject __pyx_base;
  RG rg;
};
typedef struct PySlepcRGObject PySlepcRGObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcRG_Type;

/* "slepc4py/SLEPc.pxd":72
 *     cdef SlepcRG rg
 * 
 * ctypedef public api class EPS(Object) [             # <<<<<<<<<<<<<<
 *     type PySlepcEPS_Type,
 *     object PySlepcEPSObject,
 */
struct PySlepcEPSObject {
  struct PyPetscObjectObject __pyx_base;
  EPS eps;
};
typedef struct PySlepcEPSObject PySlepcEPSObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcEPS_Type;

/* "slepc4py/SLEPc.pxd":78
 *     cdef SlepcEPS eps
 * 
 * ctypedef public api class SVD(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcSVD_Type,
 *     object PySlepcSVDObject,
 */
struct PySlepcSVDObject {
  struct PyPetscObjectObject __pyx_base;
  SVD svd;
};
typedef struct PySlepcSVDObject PySlepcSVDObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcSVD_Type;

/* "slepc4py/SLEPc.pxd":84
 *     cdef SlepcSVD svd
 * 
 * ctypedef public api class PEP(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcPEP_Type,
 *     object PySlepcPEPObject,
 */
struct PySlepcPEPObject {
  struct PyPetscObjectObject __pyx_base;
  PEP pep;
};
typedef struct PySlepcPEPObject PySlepcPEPObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcPEP_Type;

/* "slepc4py/SLEPc.pxd":90
 *     cdef SlepcPEP pep
 * 
 * ctypedef public api class NEP(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcNEP_Type,
 *     object PySlepcNEPObject,
 */
struct PySlepcNEPObject {
  struct PyPetscObjectObject __pyx_base;
  NEP nep;
};
typedef struct PySlepcNEPObject PySlepcNEPObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcNEP_Type;

/* "slepc4py/SLEPc.pxd":96
 *     cdef SlepcNEP nep
 * 
 * ctypedef public api class MFN(Object) [             # <<<<<<<<<<<<<<
 *     type   PySlepcMFN_Type,
 *     object PySlepcMFNObject,
 */
struct PySlepcMFNObject {
  struct PyPetscObjectObject __pyx_base;
  MFN mfn;
};
typedef struct PySlepcMFNObject PySlepcMFNObject;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcMFN_Type;

/* "SLEPc/allocate.pxi":11
 * #@cython.final
 * #@cython.internal
 * cdef class _p_mem:             # <<<<<<<<<<<<<<
 *     cdef void *buf
 *     def __cinit__(self):
 */
struct __pyx_obj_8slepc4py_5SLEPc__p_mem {
  PyObject_HEAD
  void *buf;
};


/* "SLEPc/Sys.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * cdef class Sys:             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
struct __pyx_obj_8slepc4py_5SLEPc_Sys {
  PyObject_HEAD
};


__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscObject_Type;

/* "petsc4py/PETSc.pxd":78
 *     cdef object base
 * 
 * ctypedef public api class Object [             # <<<<<<<<<<<<<<
 *     type   PyPetscObject_Type,
 *     object PyPetscObjectObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Object {
  PyObject *(*get_attr)(struct PyPetscObjectObject *, char *);
  PyObject *(*set_attr)(struct PyPetscObjectObject *, char *, PyObject *);
  PyObject *(*get_dict)(struct PyPetscObjectObject *);
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Object *__pyx_vtabptr_8petsc4py_5PETSc_Object;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscViewer_Type;

/* "petsc4py/PETSc.pxd":90
 *     cdef object get_dict(self)
 * 
 * ctypedef public api class Viewer(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscViewer_Type,
 *     object PyPetscViewerObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer *__pyx_vtabptr_8petsc4py_5PETSc_Viewer;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscRandom_Type;

/* "petsc4py/PETSc.pxd":96
 *     cdef PetscViewer vwr
 * 
 * ctypedef public api class Random(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscRandom_Type,
 *     object PyPetscRandomObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Random {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Random *__pyx_vtabptr_8petsc4py_5PETSc_Random;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscIS_Type;

/* "petsc4py/PETSc.pxd":102
 *     cdef PetscRandom rnd
 * 
 * ctypedef public api class IS(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscIS_Type,
 *     object PyPetscISObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_IS {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_IS *__pyx_vtabptr_8petsc4py_5PETSc_IS;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscLGMap_Type;

/* "petsc4py/PETSc.pxd":108
 *     cdef PetscIS iset
 * 
 * ctypedef public api class LGMap(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscLGMap_Type,
 *     object PyPetscLGMapObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap *__pyx_vtabptr_8petsc4py_5PETSc_LGMap;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSF_Type;

/* "petsc4py/PETSc.pxd":114
 *     cdef PetscLGMap lgm
 * 
 * ctypedef public api class SF(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSF_Type,
 *     object PyPetscSFObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_SF {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_SF *__pyx_vtabptr_8petsc4py_5PETSc_SF;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscVec_Type;

/* "petsc4py/PETSc.pxd":120
 *     cdef PetscSF sf
 * 
 * ctypedef public api class Vec(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscVec_Type,
 *     object PyPetscVecObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec *__pyx_vtabptr_8petsc4py_5PETSc_Vec;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscScatter_Type;

/* "petsc4py/PETSc.pxd":126
 *     cdef PetscVec vec
 * 
 * ctypedef public api class Scatter(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscScatter_Type,
 *     object PyPetscScatterObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter *__pyx_vtabptr_8petsc4py_5PETSc_Scatter;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSection_Type;

/* "petsc4py/PETSc.pxd":132
 *     cdef PetscScatter sct
 * 
 * ctypedef public api class Section(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSection_Type,
 *     object PyPetscSectionObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Section {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Section *__pyx_vtabptr_8petsc4py_5PETSc_Section;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscMat_Type;

/* "petsc4py/PETSc.pxd":138
 *     cdef PetscSection sec
 * 
 * ctypedef public api class Mat(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscMat_Type,
 *     object PyPetscMatObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat *__pyx_vtabptr_8petsc4py_5PETSc_Mat;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscNullSpace_Type;

/* "petsc4py/PETSc.pxd":144
 *     cdef PetscMat mat
 * 
 * ctypedef public api class NullSpace(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscNullSpace_Type,
 *     object PyPetscNullSpaceObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace *__pyx_vtabptr_8petsc4py_5PETSc_NullSpace;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPC_Type;

/* "petsc4py/PETSc.pxd":150
 *     cdef PetscNullSpace nsp
 * 
 * ctypedef public api class PC(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscPC_Type,
 *     object PyPetscPCObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_PC {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_PC *__pyx_vtabptr_8petsc4py_5PETSc_PC;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscKSP_Type;

/* "petsc4py/PETSc.pxd":156
 *     cdef PetscPC pc
 * 
 * ctypedef public api class KSP(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscKSP_Type,
 *     object PyPetscKSPObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP *__pyx_vtabptr_8petsc4py_5PETSc_KSP;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscSNES_Type;

/* "petsc4py/PETSc.pxd":162
 *     cdef PetscKSP ksp
 * 
 * ctypedef public api class SNES(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscSNES_Type,
 *     object PyPetscSNESObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES *__pyx_vtabptr_8petsc4py_5PETSc_SNES;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTS_Type;

/* "petsc4py/PETSc.pxd":168
 *     cdef PetscSNES snes
 * 
 * ctypedef public api class TS(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscTS_Type,
 *     object PyPetscTSObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_TS {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_TS *__pyx_vtabptr_8petsc4py_5PETSc_TS;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscTAO_Type;

/* "petsc4py/PETSc.pxd":174
 *     cdef PetscTS ts
 * 
 * ctypedef public api class TAO(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscTAO_Type,
 *     object PyPetscTAOObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO *__pyx_vtabptr_8petsc4py_5PETSc_TAO;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscAO_Type;

/* "petsc4py/PETSc.pxd":180
 *     cdef PetscTAO tao
 * 
 * ctypedef public api class AO(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscAO_Type,
 *     object PyPetscAOObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_AO {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_AO *__pyx_vtabptr_8petsc4py_5PETSc_AO;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscDM_Type;

/* "petsc4py/PETSc.pxd":186
 *     cdef PetscAO ao
 * 
 * ctypedef public api class DM(Object) [             # <<<<<<<<<<<<<<
 *     type   PyPetscDM_Type,
 *     object PyPetscDMObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_DM {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_DM *__pyx_vtabptr_8petsc4py_5PETSc_DM;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyPetscPartitioner_Type;

/* "petsc4py/PETSc.pxd":192
 *     cdef PetscDM dm
 * 
 * ctypedef public api class Partitioner(Object) [             # <<<<<<<<<<<<<<
 *     type PyPetscPartitioner_Type,
 *     object PyPetscPartitionerObject,
 */

struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner *__pyx_vtabptr_8petsc4py_5PETSc_Partitioner;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcST_Type;

/* "SLEPc/ST.pyx":34
 * # -----------------------------------------------------------------------------
 * 
 * cdef class ST(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_ST {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_ST *__pyx_vtabptr_8slepc4py_5SLEPc_ST;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcBV_Type;

/* "SLEPc/BV.pyx":46
 * # -----------------------------------------------------------------------------
 * 
 * cdef class BV(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV *__pyx_vtabptr_8slepc4py_5SLEPc_BV;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcDS_Type;

/* "SLEPc/DS.pyx":62
 * # -----------------------------------------------------------------------------
 * 
 * cdef class DS(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS *__pyx_vtabptr_8slepc4py_5SLEPc_DS;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcFN_Type;

/* "SLEPc/FN.pyx":31
 * # -----------------------------------------------------------------------------
 * 
 * cdef class FN(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN *__pyx_vtabptr_8slepc4py_5SLEPc_FN;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcRG_Type;

/* "SLEPc/RG.pyx":14
 * # -----------------------------------------------------------------------------
 * 
 * cdef class RG(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG *__pyx_vtabptr_8slepc4py_5SLEPc_RG;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcEPS_Type;

/* "SLEPc/EPS.pyx":209
 * # -----------------------------------------------------------------------------
 * 
 * cdef class EPS(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS *__pyx_vtabptr_8slepc4py_5SLEPc_EPS;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcSVD_Type;

/* "SLEPc/SVD.pyx":58
 * # -----------------------------------------------------------------------------
 * 
 * cdef class SVD(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD *__pyx_vtabptr_8slepc4py_5SLEPc_SVD;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcPEP_Type;

/* "SLEPc/PEP.pyx":167
 * # -----------------------------------------------------------------------------
 * 
 * cdef class PEP(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP *__pyx_vtabptr_8slepc4py_5SLEPc_PEP;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcNEP_Type;

/* "SLEPc/NEP.pyx":83
 * # -----------------------------------------------------------------------------
 * 
 * cdef class NEP(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *__pyx_vtabptr_8slepc4py_5SLEPc_NEP;

__PYX_EXTERN_C DL_EXPORT(PyTypeObject) PySlepcMFN_Type;

/* "SLEPc/MFN.pyx":25
 * # -----------------------------------------------------------------------------
 * 
 * cdef class MFN(Object):             # <<<<<<<<<<<<<<
 * 
 *     """
 */

struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN {
  struct __pyx_vtabstruct_8petsc4py_5PETSc_Object __pyx_base;
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN *__pyx_vtabptr_8slepc4py_5SLEPc_MFN;

/* --- 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_COMPILING_IN_CPYTHON
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);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

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

/* decode_c_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* decode_bytes.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
         PyObject* string, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    return __Pyx_decode_c_bytes(
        PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
        start, stop, encoding, errors, decode_func);
}

/* 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

/* 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

/* 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);

/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* PyThreadStateGet.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = PyThreadState_GET();
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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);
#else
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(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

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* 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);

/* SaveResetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

/* PyErrExceptionMatches.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

/* GetException.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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

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

/* 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 CYTHON_INLINE 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);

/* 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);

/* ListAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
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);

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

/* ListCompAppend.proto */
#if CYTHON_COMPILING_IN_CPYTHON
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

/* ArgTypeTest.proto */
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

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

/* CallNextTpDealloc.proto */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyObject *dict);

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

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

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

/* GetNameInClass.proto */
static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name);

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

/* 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);

/* PyObjectSetAttrStr.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#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) {
    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);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyIdentifierFromString.proto */
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

/* ModuleImport.proto */
static PyObject *__Pyx_ImportModule(const char *name);

/* RegisterModuleCleanup.proto */
static void __pyx_module_cleanup(PyObject *self);
static int __Pyx_RegisterCleanup(void);

/* 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_int(int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_STMatMode(STMatMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogType(BVOrthogType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogRefineType(BVOrthogRefineType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogBlockType(BVOrthogBlockType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSStateType(DSStateType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSMatType(DSMatType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FNCombineType(FNCombineType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSProblemType(EPSProblemType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSExtraction(EPSExtraction value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSBalance(EPSBalance value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSErrorType(EPSErrorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSWhich(EPSWhich value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConv(EPSConv value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConvergedReason(EPSConvergedReason value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSPowerShiftType(EPSPowerShiftType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSLanczosReorthogType(EPSLanczosReorthogType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDErrorType(SVDErrorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDWhich(SVDWhich value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDConvergedReason(SVDConvergedReason value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPProblemType(PEPProblemType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPWhich(PEPWhich value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPBasis(PEPBasis value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPScale(PEPScale value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefine(PEPRefine value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefineScheme(PEPRefineScheme value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPExtract(PEPExtract value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPErrorType(PEPErrorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConv(PEPConv value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConvergedReason(PEPConvergedReason value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPErrorType(NEPErrorType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPWhich(NEPWhich value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPConvergedReason(NEPConvergedReason value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefine(NEPRefine value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefineScheme(NEPRefineScheme value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MFNConvergedReason(MFNConvergedReason value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscInt(PetscInt value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value);

/* ClassMethod.proto */
#include "descrobject.h"
static PyObject* __Pyx_Method_ClassMethod(PyObject *method);

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

/* CIntFromPy.proto */
static CYTHON_INLINE PetscInt __Pyx_PyInt_As_PetscInt(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE MatStructure __Pyx_PyInt_As_MatStructure(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE STMatMode __Pyx_PyInt_As_STMatMode(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE BVOrthogType __Pyx_PyInt_As_BVOrthogType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE BVOrthogRefineType __Pyx_PyInt_As_BVOrthogRefineType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE BVOrthogBlockType __Pyx_PyInt_As_BVOrthogBlockType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE NormType __Pyx_PyInt_As_NormType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE DSStateType __Pyx_PyInt_As_DSStateType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSProblemType __Pyx_PyInt_As_EPSProblemType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSBalance __Pyx_PyInt_As_EPSBalance(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSExtraction __Pyx_PyInt_As_EPSExtraction(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSWhich __Pyx_PyInt_As_EPSWhich(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSConv __Pyx_PyInt_As_EPSConv(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSErrorType __Pyx_PyInt_As_EPSErrorType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSPowerShiftType __Pyx_PyInt_As_EPSPowerShiftType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE EPSLanczosReorthogType __Pyx_PyInt_As_EPSLanczosReorthogType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE SVDWhich __Pyx_PyInt_As_SVDWhich(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE SVDErrorType __Pyx_PyInt_As_SVDErrorType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPBasis __Pyx_PyInt_As_PEPBasis(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPProblemType __Pyx_PyInt_As_PEPProblemType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPWhich __Pyx_PyInt_As_PEPWhich(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPConv __Pyx_PyInt_As_PEPConv(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPRefine __Pyx_PyInt_As_PEPRefine(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPRefineScheme __Pyx_PyInt_As_PEPRefineScheme(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPScale __Pyx_PyInt_As_PEPScale(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PEPErrorType __Pyx_PyInt_As_PEPErrorType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE NEPWhich __Pyx_PyInt_As_NEPWhich(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE NEPErrorType __Pyx_PyInt_As_NEPErrorType(PyObject *);

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

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

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* TypeImport.proto */
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

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


/* Module declarations from 'petsc4py.PETSc' */
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Comm = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Object = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Viewer = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Random = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_IS = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_LGMap = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SF = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Vec = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Scatter = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Section = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Mat = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_NullSpace = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_PC = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_KSP = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SNES = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TS = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TAO = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_AO = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DM = 0;
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Partitioner = 0;
static MPI_Comm (*__pyx_f_8petsc4py_5PETSc_GetComm)(PyObject *, MPI_Comm); /*proto*/
static MPI_Comm (*__pyx_f_8petsc4py_5PETSc_GetCommDefault)(void); /*proto*/
static int (*__pyx_f_8petsc4py_5PETSc_PyPetscType_Register)(int, PyTypeObject *); /*proto*/

/* Module declarations from 'slepc4py.SLEPc' */
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_ST = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_BV = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_DS = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_FN = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_RG = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_EPS = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_SVD = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_PEP = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_NEP = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_MFN = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc__p_mem = 0;
static PyTypeObject *__pyx_ptype_8slepc4py_5SLEPc_Sys = 0;
static PyObject *__pyx_v_8slepc4py_5SLEPc_PetscError = 0;
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_bytes2str(const char *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_str2bytes(PyObject *, const char **); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_S_(const char *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_allocate(size_t, void **); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SETERR(int); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_CHKERR(int); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toInt(PetscInt); /*proto*/
static CYTHON_INLINE PetscInt __pyx_f_8slepc4py_5SLEPc_asInt(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toReal(PetscReal); /*proto*/
static CYTHON_INLINE PetscReal __pyx_f_8slepc4py_5SLEPc_asReal(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toScalar(PetscScalar); /*proto*/
static CYTHON_INLINE PetscScalar __pyx_f_8slepc4py_5SLEPc_asScalar(PyObject *); /*proto*/
static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_def_Comm(PyObject *, MPI_Comm); /*proto*/
static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT(void); /*proto*/
static CYTHON_INLINE MatStructure __pyx_f_8slepc4py_5SLEPc_matstructure(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_PetscINCREF(PetscObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(PetscObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_BV_Sizes(PyObject *, PetscInt *, PetscInt *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_iarray_s(PyObject *, PetscInt *, PetscScalar **); /*proto*/
static CYTHON_INLINE struct PyPetscMatObject *__pyx_f_8slepc4py_5SLEPc_ref_Mat(Mat); /*proto*/
static CYTHON_INLINE struct PySlepcNEPObject *__pyx_f_8slepc4py_5SLEPc_ref_NEP(NEP); /*proto*/
static int __pyx_f_8slepc4py_5SLEPc_NEP_Function(NEP, PetscScalar, Mat, Mat, void *); /*proto*/
static int __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian(NEP, PetscScalar, Mat, void *); /*proto*/
static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_setref(void *, void *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcST_New(ST); /*proto*/
static ST __pyx_f_8slepc4py_5SLEPc_PySlepcST_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New(BV); /*proto*/
static BV __pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New(DS); /*proto*/
static DS __pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New(FN); /*proto*/
static FN __pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New(RG); /*proto*/
static RG __pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New(EPS); /*proto*/
static EPS __pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New(SVD); /*proto*/
static SVD __pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New(PEP); /*proto*/
static PEP __pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New(NEP); /*proto*/
static NEP __pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get(PyObject *); /*proto*/
static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New(MFN); /*proto*/
static MFN __pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get(PyObject *); /*proto*/
static int __pyx_f_8slepc4py_5SLEPc_initialize(PyObject *); /*proto*/
static int __pyx_f_8slepc4py_5SLEPc_register(char *); /*proto*/
static void __pyx_f_8slepc4py_5SLEPc_finalize(void); /*proto*/
#define __Pyx_MODULE_NAME "slepc4py.SLEPc"
int __pyx_module_is_main_slepc4py__SLEPc = 0;

/* Implementation of 'slepc4py.SLEPc' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static const char __pyx_k_A[] = "A";
static const char __pyx_k_B[] = "B";
static const char __pyx_k_C[] = "C";
static const char __pyx_k_D[] = "D";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_J[] = "J";
static const char __pyx_k_P[] = "P";
static const char __pyx_k_Q[] = "Q";
static const char __pyx_k_R[] = "R";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_U[] = "U";
static const char __pyx_k_V[] = "V";
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_Z[] = "Z";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_l[] = "l";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_q[] = "q";
static const char __pyx_k_s[] = "s";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_v[] = "v";
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_Au[] = "Au";
static const char __pyx_k_Bu[] = "Bu";
static const char __pyx_k_Dl[] = "Dl";
static const char __pyx_k_Dr[] = "Dr";
static const char __pyx_k_GD[] = "GD";
static const char __pyx_k_GS[] = "GS";
static const char __pyx_k_JD[] = "JD";
static const char __pyx_k_VT[] = "VT";
static const char __pyx_k_Vi[] = "Vi";
static const char __pyx_k_Vr[] = "Vr";
static const char __pyx_k__2[] = "\n";
static const char __pyx_k_bv[] = "bv";
static const char __pyx_k_ds[] = "ds";
static const char __pyx_k_fn[] = "fn";
static const char __pyx_k_ld[] = "ld";
static const char __pyx_k_rg[] = "rg";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_ABS[] = "ABS";
static const char __pyx_k_ADD[] = "ADD";
static const char __pyx_k_ALL[] = "ALL";
static const char __pyx_k_CGS[] = "CGS";
static const char __pyx_k_EXP[] = "EXP";
static const char __pyx_k_HEP[] = "HEP";
static const char __pyx_k_LOG[] = "LOG";
static const char __pyx_k_MAT[] = "MAT";
static const char __pyx_k_MBE[] = "MBE";
static const char __pyx_k_MGS[] = "MGS";
static const char __pyx_k_NEP[] = "NEP";
static const char __pyx_k_PEP[] = "PEP";
static const char __pyx_k_PHI[] = "PHI";
static const char __pyx_k_RAW[] = "RAW";
static const char __pyx_k_REL[] = "REL";
static const char __pyx_k_RII[] = "RII";
static const char __pyx_k_SLP[] = "SLP";
static const char __pyx_k_SVD[] = "SVD";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_eps[] = "eps";
static const char __pyx_k_eta[] = "eta";
static const char __pyx_k_ext[] = "ext";
static const char __pyx_k_its[] = "its";
static const char __pyx_k_ksp[] = "ksp";
static const char __pyx_k_lag[] = "lag";
static const char __pyx_k_mat[] = "mat";
static const char __pyx_k_mpd[] = "mpd";
static const char __pyx_k_ncv[] = "ncv";
static const char __pyx_k_nev[] = "nev";
static const char __pyx_k_nsv[] = "nsv";
static const char __pyx_k_ref[] = "ref";
static const char __pyx_k_seq[] = "seq";
static const char __pyx_k_tau[] = "tau";
static const char __pyx_k_tol[] = "tol";
static const char __pyx_k_BOTH[] = "BOTH";
static const char __pyx_k_CHOL[] = "CHOL";
static const char __pyx_k_CISS[] = "CISS";
static const char __pyx_k_COPY[] = "COPY";
static const char __pyx_k_Conv[] = "Conv";
static const char __pyx_k_FULL[] = "FULL";
static const char __pyx_k_GHEP[] = "GHEP";
static const char __pyx_k_NHEP[] = "NHEP";
static const char __pyx_k_NONE[] = "NONE";
static const char __pyx_k_NORM[] = "NORM";
static const char __pyx_k_RING[] = "RING";
static const char __pyx_k_RITZ[] = "RITZ";
static const char __pyx_k_RQCG[] = "RQCG";
static const char __pyx_k_SQRT[] = "SQRT";
static const char __pyx_k_SVEC[] = "SVEC";
static const char __pyx_k_TOAR[] = "TOAR";
static const char __pyx_k_Type[] = "Type";
static const char __pyx_k_USER[] = "USER";
static const char __pyx_k_VECS[] = "VECS";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_beta[] = "beta";
static const char __pyx_k_comm[] = "comm";
static const char __pyx_k_comp[] = "comp";
static const char __pyx_k_conv[] = "conv";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_flag[] = "flag";
static const char __pyx_k_inta[] = "inta";
static const char __pyx_k_intb[] = "intb";
static const char __pyx_k_keep[] = "keep";
static const char __pyx_k_lbda[] = "lbda";
static const char __pyx_k_lock[] = "lock";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_meth[] = "meth";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_orth[] = "orth";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_Basis[] = "Basis";
static const char __pyx_k_CROSS[] = "CROSS";
static const char __pyx_k_Error[] = "Error";
static const char __pyx_k_FEAST[] = "FEAST";
static const char __pyx_k_GHIEP[] = "GHIEP";
static const char __pyx_k_GNHEP[] = "GNHEP";
static const char __pyx_k_LOCAL[] = "LOCAL";
static const char __pyx_k_NEVER[] = "NEVER";
static const char __pyx_k_POWER[] = "POWER";
static const char __pyx_k_SCHUR[] = "SCHUR";
static const char __pyx_k_SHELL[] = "SHELL";
static const char __pyx_k_SHIFT[] = "SHIFT";
static const char __pyx_k_STOAR[] = "STOAR";
static const char __pyx_k_Scale[] = "Scale";
static const char __pyx_k_TRLAN[] = "TRLAN";
static const char __pyx_k_Which[] = "Which";
static const char __pyx_k_alpha[] = "alpha";
static const char __pyx_k_basis[] = "basis";
static const char __pyx_k_block[] = "block";
static const char __pyx_k_cform[] = "cform";
static const char __pyx_k_devel[] = "devel";
static const char __pyx_k_etype[] = "etype";
static const char __pyx_k_getBV[] = "getBV";
static const char __pyx_k_getST[] = "getST";
static const char __pyx_k_indef[] = "indef";
static const char __pyx_k_kargs[] = "kargs";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_maxit[] = "maxit";
static const char __pyx_k_minor[] = "minor";
static const char __pyx_k_npart[] = "npart";
static const char __pyx_k_nrest[] = "nrest";
static const char __pyx_k_patch[] = "patch";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_ready[] = "ready";
static const char __pyx_k_scale[] = "scale";
static const char __pyx_k_setBV[] = "setBV";
static const char __pyx_k_setST[] = "setST";
static const char __pyx_k_setUp[] = "setUp";
static const char __pyx_k_shift[] = "shift";
static const char __pyx_k_sizes[] = "sizes";
static const char __pyx_k_space[] = "space";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_state[] = "state";
static const char __pyx_k_strip[] = "strip";
static const char __pyx_k_which[] = "which";
static const char __pyx_k_ALWAYS[] = "ALWAYS";
static const char __pyx_k_ARPACK[] = "ARPACK";
static const char __pyx_k_BLOPEX[] = "BLOPEX";
static const char __pyx_k_BVType[] = "BVType";
static const char __pyx_k_CAYLEY[] = "CAYLEY";
static const char __pyx_k_CYCLIC[] = "CYCLIC";
static const char __pyx_k_DECIDE[] = "DECIDE";
static const char __pyx_k_DIVIDE[] = "DIVIDE";
static const char __pyx_k_DSType[] = "DSType";
static const char __pyx_k_FNType[] = "FNType";
static const char __pyx_k_KRYLOV[] = "KRYLOV";
static const char __pyx_k_LAPACK[] = "LAPACK";
static const char __pyx_k_LINEAR[] = "LINEAR";
static const char __pyx_k_LOBPCG[] = "LOBPCG";
static const char __pyx_k_NLEIGS[] = "NLEIGS";
static const char __pyx_k_PGNHEP[] = "PGNHEP";
static const char __pyx_k_PRIMME[] = "PRIMME";
static const char __pyx_k_RGType[] = "RGType";
static const char __pyx_k_Refine[] = "Refine";
static const char __pyx_k_SCALAR[] = "SCALAR";
static const char __pyx_k_SIMPLE[] = "SIMPLE";
static const char __pyx_k_STType[] = "STType";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_author[] = "author";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_create[] = "create";
static const char __pyx_k_cutoff[] = "cutoff";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_detect[] = "detect";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_getKSP[] = "getKSP";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_max_it[] = "max_it";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_radius[] = "radius";
static const char __pyx_k_refine[] = "refine";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_scheme[] = "scheme";
static const char __pyx_k_setKSP[] = "setKSP";
static const char __pyx_k_subint[] = "subint";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_viewer[] = "viewer";
static const char __pyx_k_vscale[] = "vscale";
static const char __pyx_k_ARNOLDI[] = "ARNOLDI";
static const char __pyx_k_BLZPACK[] = "BLZPACK";
static const char __pyx_k_BV_type[] = "\n    BV type\n    ";
static const char __pyx_k_Balance[] = "Balance";
static const char __pyx_k_COMBINE[] = "COMBINE";
static const char __pyx_k_COMPOSE[] = "COMPOSE";
static const char __pyx_k_DEFAULT[] = "DEFAULT";
static const char __pyx_k_DELAYED[] = "DELAYED";
static const char __pyx_k_DS_type[] = "\n    DS type\n    ";
static const char __pyx_k_ELLIPSE[] = "ELLIPSE";
static const char __pyx_k_EPSConv[] = "EPSConv";
static const char __pyx_k_EPSType[] = "EPSType";
static const char __pyx_k_EXPOKIT[] = "EXPOKIT";
static const char __pyx_k_Extract[] = "Extract";
static const char __pyx_k_FN_type[] = "\n    FN type\n    ";
static const char __pyx_k_GENERAL[] = "GENERAL";
static const char __pyx_k_HERMITE[] = "HERMITE";
static const char __pyx_k_INPLACE[] = "INPLACE";
static const char __pyx_k_INVSQRT[] = "INVSQRT";
static const char __pyx_k_LANCZOS[] = "LANCZOS";
static const char __pyx_k_LARGEST[] = "LARGEST";
static const char __pyx_k_MFNType[] = "MFNType";
static const char __pyx_k_MatMode[] = "MatMode";
static const char __pyx_k_MatType[] = "MatType";
static const char __pyx_k_NEPType[] = "NEPType";
static const char __pyx_k_ONESIDE[] = "ONESIDE";
static const char __pyx_k_PARTIAL[] = "PARTIAL";
static const char __pyx_k_PEPConv[] = "PEPConv";
static const char __pyx_k_PEPType[] = "PEPType";
static const char __pyx_k_POLYGON[] = "POLYGON";
static const char __pyx_k_PRECOND[] = "PRECOND";
static const char __pyx_k_REFINED[] = "REFINED";
static const char __pyx_k_RG_type[] = "\n    RG type\n    ";
static const char __pyx_k_SINVERT[] = "SINVERT";
static const char __pyx_k_SVDType[] = "SVDType";
static const char __pyx_k_TWOSIDE[] = "TWOSIDE";
static const char __pyx_k_balance[] = "balance";
static const char __pyx_k_bv_type[] = "bv_type";
static const char __pyx_k_delayed[] = "delayed";
static const char __pyx_k_ds_type[] = "ds_type";
static const char __pyx_k_fn_type[] = "fn_type";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_release[] = "release";
static const char __pyx_k_rg_type[] = "rg_type";
static const char __pyx_k_setType[] = "setType";
static const char __pyx_k_st_type[] = "st_type";
static const char __pyx_k_trueres[] = "trueres";
static const char __pyx_k_ABSOLUTE[] = "ABSOLUTE";
static const char __pyx_k_BACKWARD[] = "BACKWARD";
static const char __pyx_k_CONSTANT[] = "CONSTANT";
static const char __pyx_k_DIAGONAL[] = "DIAGONAL";
static const char __pyx_k_EPSWhich[] = "EPSWhich";
static const char __pyx_k_EXPLICIT[] = "EXPLICIT";
static const char __pyx_k_HARMONIC[] = "HARMONIC";
static const char __pyx_k_IFNEEDED[] = "IFNEEDED";
static const char __pyx_k_INTERPOL[] = "INTERPOL";
static const char __pyx_k_INTERVAL[] = "INTERVAL";
static const char __pyx_k_LAGUERRE[] = "LAGUERRE";
static const char __pyx_k_LEGENDRE[] = "LEGENDRE";
static const char __pyx_k_MONOMIAL[] = "MONOMIAL";
static const char __pyx_k_MULTIPLE[] = "MULTIPLE";
static const char __pyx_k_MULTIPLY[] = "MULTIPLY";
static const char __pyx_k_NARNOLDI[] = "NARNOLDI";
static const char __pyx_k_NEPWhich[] = "NEPWhich";
static const char __pyx_k_PEPBasis[] = "PEPBasis";
static const char __pyx_k_PEPScale[] = "PEPScale";
static const char __pyx_k_PEPWhich[] = "PEPWhich";
static const char __pyx_k_PERIODIC[] = "PERIODIC";
static const char __pyx_k_QARNOLDI[] = "QARNOLDI";
static const char __pyx_k_RATIONAL[] = "RATIONAL";
static const char __pyx_k_RAYLEIGH[] = "RAYLEIGH";
static const char __pyx_k_RELATIVE[] = "RELATIVE";
static const char __pyx_k_RESIDUAL[] = "RESIDUAL";
static const char __pyx_k_SMALLEST[] = "SMALLEST";
static const char __pyx_k_SUBSPACE[] = "SUBSPACE";
static const char __pyx_k_SVDWhich[] = "SVDWhich";
static const char __pyx_k_eps_type[] = "eps_type";
static const char __pyx_k_finalize[] = "_finalize";
static const char __pyx_k_function[] = "function";
static const char __pyx_k_getShift[] = "getShift";
static const char __pyx_k_globalup[] = "globalup";
static const char __pyx_k_jacobian[] = "jacobian";
static const char __pyx_k_mfn_type[] = "mfn_type";
static const char __pyx_k_nep_type[] = "nep_type";
static const char __pyx_k_pep_type[] = "pep_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_reorthog[] = "reorthog";
static const char __pyx_k_setArray[] = "setArray";
static const char __pyx_k_setShift[] = "setShift";
static const char __pyx_k_setSizes[] = "setSizes";
static const char __pyx_k_subminor[] = "subminor";
static const char __pyx_k_svd_type[] = "svd_type";
static const char __pyx_k_trackall[] = "trackall";
static const char __pyx_k_BlockType[] = "BlockType";
static const char __pyx_k_COMM_NULL[] = "COMM_NULL";
static const char __pyx_k_COMM_SELF[] = "COMM_SELF";
static const char __pyx_k_CONDENSED[] = "CONDENSED";
static const char __pyx_k_DETERMINE[] = "DETERMINE";
static const char __pyx_k_DSMatType[] = "DSMatType";
static const char __pyx_k_ErrorType[] = "ErrorType";
static const char __pyx_k_HERMITIAN[] = "HERMITIAN";
static const char __pyx_k_ITERATING[] = "ITERATING";
static const char __pyx_k_NEPRefine[] = "NEPRefine";
static const char __pyx_k_PEPRefine[] = "PEPRefine";
static const char __pyx_k_SELECTIVE[] = "SELECTIVE";
static const char __pyx_k_STMatMode[] = "STMatMode";
static const char __pyx_k_StateType[] = "StateType";
static const char __pyx_k_TRLANCZOS[] = "TRLANCZOS";
static const char __pyx_k_TRUNCATED[] = "TRUNCATED";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_WILKINSON[] = "WILKINSON";
static const char __pyx_k_getTarget[] = "getTarget";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_norm_type[] = "norm_type";
static const char __pyx_k_operators[] = "operators";
static const char __pyx_k_setTarget[] = "setTarget";
static const char __pyx_k_structure[] = "structure";
static const char __pyx_k_CHEBYSHEV1[] = "CHEBYSHEV1";
static const char __pyx_k_CHEBYSHEV2[] = "CHEBYSHEV2";
static const char __pyx_k_COMM_WORLD[] = "COMM_WORLD";
static const char __pyx_k_CONTIGUOUS[] = "CONTIGUOUS";
static const char __pyx_k_EPSBalance[] = "EPSBalance";
static const char __pyx_k_Extraction[] = "Extraction";
static const char __pyx_k_GYROSCOPIC[] = "GYROSCOPIC";
static const char __pyx_k_OrthogType[] = "OrthogType";
static const char __pyx_k_PEPExtract[] = "PEPExtract";
static const char __pyx_k_RefineType[] = "RefineType";
static const char __pyx_k_STRUCTURED[] = "STRUCTURED";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_authorinfo[] = "authorinfo";
static const char __pyx_k_extraction[] = "extraction";
static const char __pyx_k_getMatMode[] = "getMatMode";
static const char __pyx_k_getVersion[] = "getVersion";
static const char __pyx_k_initialize[] = "_initialize";
static const char __pyx_k_iterations[] = "iterations";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_setMatMode[] = "setMatMode";
static const char __pyx_k_CombineType[] = "CombineType";
static const char __pyx_k_DSStateType[] = "DSStateType";
static const char __pyx_k_KRYLOVSCHUR[] = "KRYLOVSCHUR";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_ProblemType[] = "ProblemType";
static const char __pyx_k_TARGET_REAL[] = "TARGET_REAL";
static const char __pyx_k_createDense[] = "createDense";
static const char __pyx_k_ghostUpdate[] = "ghostUpdate";
static const char __pyx_k_BVOrthogType[] = "BVOrthogType";
static const char __pyx_k_DIVERGED_ITS[] = "DIVERGED_ITS";
static const char __pyx_k_EPSErrorType[] = "EPSErrorType";
static const char __pyx_k_INTERMEDIATE[] = "INTERMEDIATE";
static const char __pyx_k_LARGEST_REAL[] = "LARGEST_REAL";
static const char __pyx_k_NEPErrorType[] = "NEPErrorType";
static const char __pyx_k_PEPErrorType[] = "PEPErrorType";
static const char __pyx_k_RefineScheme[] = "RefineScheme";
static const char __pyx_k_SVDErrorType[] = "SVDErrorType";
static const char __pyx_k_problem_type[] = "problem_type";
static const char __pyx_k_CONVERGED_ITS[] = "CONVERGED_ITS";
static const char __pyx_k_CONVERGED_TOL[] = "CONVERGED_TOL";
static const char __pyx_k_EPSExtraction[] = "EPSExtraction";
static const char __pyx_k_FNCombineType[] = "FNCombineType";
static const char __pyx_k_SMALLEST_REAL[] = "SMALLEST_REAL";
static const char __pyx_k_getExtraction[] = "getExtraction";
static const char __pyx_k_getTolerances[] = "getTolerances";
static const char __pyx_k_setExtraction[] = "setExtraction";
static const char __pyx_k_setTolerances[] = "setTolerances";
static const char __pyx_k_CONVERGED_USER[] = "CONVERGED_USER";
static const char __pyx_k_EPSProblemType[] = "EPSProblemType";
static const char __pyx_k_HARMONIC_RIGHT[] = "HARMONIC_RIGHT";
static const char __pyx_k_PEPProblemType[] = "PEPProblemType";
static const char __pyx_k_PowerShiftType[] = "PowerShiftType";
static const char __pyx_k_getProblemType[] = "getProblemType";
static const char __pyx_k_getVersionInfo[] = "getVersionInfo";
static const char __pyx_k_petsc4py_PETSc[] = "petsc4py.PETSc";
static const char __pyx_k_setProblemType[] = "setProblemType";
static const char __pyx_k_slepc4py_SLEPc[] = "slepc4py.SLEPc";
static const char __pyx_k_ConvergedReason[] = "ConvergedReason";
static const char __pyx_k_NEPRefineScheme[] = "NEPRefineScheme";
static const char __pyx_k_OrthogBlockType[] = "OrthogBlockType";
static const char __pyx_k_PEPRefineScheme[] = "PEPRefineScheme";
static const char __pyx_k_HARMONIC_LARGEST[] = "HARMONIC_LARGEST";
static const char __pyx_k_OrthogRefineType[] = "OrthogRefineType";
static const char __pyx_k_REFINED_HARMONIC[] = "REFINED_HARMONIC";
static const char __pyx_k_TARGET_IMAGINARY[] = "TARGET_IMAGINARY";
static const char __pyx_k_TARGET_MAGNITUDE[] = "TARGET_MAGNITUDE";
static const char __pyx_k_getActiveColumns[] = "getActiveColumns";
static const char __pyx_k_getTransposeMode[] = "getTransposeMode";
static const char __pyx_k_setTransposeMode[] = "setTransposeMode";
static const char __pyx_k_BVOrthogBlockType[] = "BVOrthogBlockType";
static const char __pyx_k_EPSPowerShiftType[] = "EPSPowerShiftType";
static const char __pyx_k_HARMONIC_RELATIVE[] = "HARMONIC_RELATIVE";
static const char __pyx_k_LARGEST_IMAGINARY[] = "LARGEST_IMAGINARY";
static const char __pyx_k_LARGEST_MAGNITUDE[] = "LARGEST_MAGNITUDE";
static const char __pyx_k_BVOrthogRefineType[] = "BVOrthogRefineType";
static const char __pyx_k_DIVERGED_BREAKDOWN[] = "DIVERGED_BREAKDOWN";
static const char __pyx_k_EPSConvergedReason[] = "EPSConvergedReason";
static const char __pyx_k_MFNConvergedReason[] = "MFNConvergedReason";
static const char __pyx_k_NEPConvergedReason[] = "NEPConvergedReason";
static const char __pyx_k_PEPConvergedReason[] = "PEPConvergedReason";
static const char __pyx_k_SMALLEST_IMAGINARY[] = "SMALLEST_IMAGINARY";
static const char __pyx_k_SMALLEST_MAGNITUDE[] = "SMALLEST_MAGNITUDE";
static const char __pyx_k_SVDConvergedReason[] = "SVDConvergedReason";
static const char __pyx_k_getWhichEigenpairs[] = "getWhichEigenpairs";
static const char __pyx_k_setWhichEigenpairs[] = "setWhichEigenpairs";
static const char __pyx_k_CONVERGED_ITERATING[] = "CONVERGED_ITERATING";
static const char __pyx_k_LanczosReorthogType[] = "LanczosReorthogType";
static const char __pyx_k_setOrthogonalization[] = "setOrthogonalization";
static const char __pyx_k_DIVERGED_LINEAR_SOLVE[] = "DIVERGED_LINEAR_SOLVE";
static const char __pyx_k_DIVERGED_SYMMETRY_LOST[] = "DIVERGED_SYMMETRY_LOST";
static const char __pyx_k_EPSLanczosReorthogType[] = "EPSLanczosReorthogType";
static const char __pyx_k_getWhichSingularTriplets[] = "getWhichSingularTriplets";
static const char __pyx_k_setWhichSingularTriplets[] = "setWhichSingularTriplets";
static const char __pyx_k_BV_orthogonalization_types_CGS[] = "\n    BV orthogonalization types\n\n    - `CGS`: Classical Gram-Schmidt.\n    - `MGS`: Modified Gram-Schmidt.\n    ";
static const char __pyx_k_EPS_problem_type_HEP_Hermitian[] = "\n    EPS problem type\n\n    - `HEP`:    Hermitian eigenproblem.\n    - `NHEP`:   Non-Hermitian eigenproblem.\n    - `GHEP`:   Generalized Hermitian eigenproblem.\n    - `GNHEP`:  Generalized Non-Hermitian eigenproblem.\n    - `PGNHEP`: Generalized Non-Hermitian eigenproblem\n                with positive definite ``B``.\n    - `GHIEP`:  Generalized Hermitian-indefinite eigenproblem.\n    ";
static const char __pyx_k_EPS_type_of_balancing_used_for[] = "\n    EPS type of balancing used for non-Hermitian problems\n\n    - `NONE`:     None.\n    - `ONESIDE`:  One-sided eigensolver, only right eigenvectors.\n    - `TWOSIDE`:  Two-sided eigensolver, right and left eigenvectors.\n    - `USER`:     User-defined.\n    ";
static const char __pyx_k_BV_block_orthogonalization_type[] = "\n    BV block-orthogonalization types\n\n    - `GS`:   Gram-Schmidt.\n    - `CHOL`: Cholesky.\n    ";
static const char __pyx_k_BV_orthogonalization_refinement[] = "\n    BV orthogonalization refinement types\n\n    - `IFNEEDED`: Reorthogonalize if a criterion is satisfied.\n    - `NEVER`:    Never reorthogonalize.\n    - `ALWAYS`:   Always reorthogonalize.\n    ";
static const char __pyx_k_DS_state_types_RAW_Not_processe[] = "\n    DS state types\n\n    - `RAW`: Not processed yet.\n    - `INTERMEDIATE`: Reduced to Hessenberg or tridiagonal form (or equivalent).\n    - `CONDENSED`: Reduced to Schur or diagonal form (or equivalent).\n    - `TRUNCATED`: Condensed form truncated to a smaller size.\n    ";
static const char __pyx_k_EPS_Lanczos_reorthogonalization[] = "\n    EPS Lanczos reorthogonalization type\n\n    - `LOCAL`:\n    - `FULL`:\n    - `SELECTIVE`:\n    - `PERIODIC`:\n    - `PARTIAL`:\n    - `DELAYED`:\n    ";
static const char __pyx_k_EPS_Power_shift_type_CONSTANT_R[] = "\n    EPS Power shift type.\n\n    - `CONSTANT`:\n    - `RAYLEIGH`:\n    - `WILKINSON`:\n    ";
static const char __pyx_k_EPS_convergence_reasons_CONVERG[] = "\n    EPS convergence reasons\n\n    - `CONVERGED_TOL`:\n    - `CONVERGED_USER`:\n    - `DIVERGED_ITS`:\n    - `DIVERGED_BREAKDOWN`:\n    - `DIVERGED_SYMMETRY_LOST`:\n    - `CONVERGED_ITERATING`:\n    ";
static const char __pyx_k_EPS_convergence_test_ABS_REL_NO[] = "\n    EPS convergence test\n\n    - `ABS`:\n    - `REL`:\n    - `NORM`:\n    - `USER`:\n    ";
static const char __pyx_k_EPS_desired_piece_of_spectrum_L[] = "\n    EPS desired piece of spectrum\n\n    - `LARGEST_MAGNITUDE`:  Largest magnitude (default).\n    - `LARGEST_REAL`:       Largest real parts.\n    - `LARGEST_IMAGINARY`:  Largest imaginary parts in magnitude.\n    - `SMALLEST_MAGNITUDE`: Smallest magnitude.\n    - `SMALLEST_REAL`:      Smallest real parts.\n    - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude.\n    - `TARGET_MAGNITUDE`:   Closest to target (in magnitude).\n    - `TARGET_REAL`:        Real part closest to target.\n    - `TARGET_IMAGINARY`:   Imaginary part closest to target.\n    - `ALL`:                All eigenvalues in an interval.\n    - `USER`:               User defined ordering.\n    ";
static const char __pyx_k_EPS_error_type_to_assess_accura[] = "\n    EPS error type to assess accuracy of computed solutions\n\n    - `ABSOLUTE`:  Absolute error.\n    - `RELATIVE`:  Relative error.\n    - `BACKWARD`:  Backward error.\n    ";
static const char __pyx_k_EPS_extraction_technique_RITZ_S[] = "\n    EPS extraction technique\n\n    - `RITZ`:              Standard Rayleigh-Ritz extraction.\n    - `HARMONIC`:          Harmonic extraction.\n    - `HARMONIC_RELATIVE`: Harmonic extraction relative to the eigenvalue.\n    - `HARMONIC_RIGHT`:    Harmonic extraction for rightmost eigenvalues.\n    - `HARMONIC_LARGEST`:  Harmonic extraction for largest magnitude (without target).\n    - `REFINED`:           Refined extraction.\n    - `REFINED_HARMONIC`:  Refined harmonic extraction.\n    ";
static const char __pyx_k_EPS_type_Native_sparse_eigensol[] = "\n    EPS type\n\n    Native sparse eigensolvers.\n\n    - `POWER`:        Power Iteration, Inverse Iteration, RQI.\n    - `SUBSPACE`:     Subspace Iteration.\n    - `ARNOLDI`:      Arnoldi.\n    - `LANCZOS`:      Lanczos.\n    - `KRYLOVSCHUR`:  Krylov-Schur (default).\n    - `GD`:           Generalized Davidson.\n    - `JD`:           Jacobi-Davidson.\n    - `RQCG`:         Rayleigh Quotient Conjugate Gradient.\n    - `LOBPCG`:       Locally Optimal Block Preconditioned Conjugate Gradient.\n    - `CISS`:         Contour Integral Spectrum Slicing.\n    - `LAPACK`:       Wrappers to dense eigensolvers in Lapack.\n\n    Wrappers to sparse eigensolvers\n    (should be enabled during installation of SLEPc)\n\n    - `ARPACK`:\n    - `BLZPACK`:\n    - `TRLAN`:\n    - `BLOPEX`:\n    - `PRIMME`:\n    - `FEAST`:\n    ";
static const char __pyx_k_Extraction_strategy_used_to_obt[] = "\n    Extraction strategy used to obtain eigenvectors of the PEP from the\n    eigenvectors of the linearization\n\n    - `NONE`:       Use the first block.\n    - `NORM`:       Use the first or last block depending on norm of H.\n    - `RESIDUAL`:   Use the block with smallest residual.\n    - `STRUCTURED`: Combine all blocks in a certain way.\n    ";
static const char __pyx_k_FN_type_of_combination_of_child[] = "\n    FN type of combination of child functions\n\n    - `ADD`:       Addition         f(x) = f1(x)+f2(x)\n    - `MULTIPLY`:  Multiplication   f(x) = f1(x)*f2(x)\n    - `DIVIDE`:    Division         f(x) = f1(x)/f2(x)\n    - `COMPOSE`:   Composition      f(x) = f2(f1(x))\n    ";
static const char __pyx_k_MFN_type_Action_of_a_matrix_fun[] = "\n    MFN type\n\n    Action of a matrix function on a vector.\n\n    - `KRYLOV`:  Restarted Krylov solver.\n    - `EXPOKIT`: Implementation of the method in Expokit.\n    ";
static const char __pyx_k_NEP_error_type_to_assess_accura[] = "\n    NEP error type to assess accuracy of computed solutions\n\n    - `ABSOLUTE`:  Absolute error.\n    - `RELATIVE`:  Relative error.\n    - `BACKWARD`:  Backward error.\n    ";
static const char __pyx_k_NEP_refinement_strategy_NONE_No[] = "\n    NEP refinement strategy\n\n    - `NONE`:     No refinement.\n    - `SIMPLE`:   Refine eigenpairs one by one.\n    - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).\n    ";
static const char __pyx_k_NEP_type_Nonlinear_eigensolvers[] = "\n    NEP type\n\n    Nonlinear eigensolvers.\n\n    - `RII`:      Residual inverse iteration.\n    - `SLP`:      Successive linear problems.\n    - `NARNOLDI`: Nonlinear Arnoldi.\n    - `CISS`:     Contour integral spectrum slice.\n    - `INTERPOL`: Polynomial interpolation.\n    - `NLEIGS`:   Fully rational Krylov method for nonlinear eigenproblems.\n    ";
static const char __pyx_k_PEP_convergence_reasons_CONVERG[] = "\n    PEP convergence reasons\n\n    - `CONVERGED_TOL`:\n    - `CONVERGED_USER`:\n    - `DIVERGED_ITS`:\n    - `DIVERGED_BREAKDOWN`:\n    - `DIVERGED_SYMMETRY_LOST`:\n    - `CONVERGED_ITERATING`:\n    ";
static const char __pyx_k_PEP_convergence_test_ABS_REL_NO[] = "\n    PEP convergence test\n\n    - `ABS`:\n    - `REL`:\n    - `NORM`:\n    - `USER`:\n    ";
static const char __pyx_k_PEP_desired_part_of_spectrum_LA[] = "\n    PEP desired part of spectrum\n\n    - `LARGEST_MAGNITUDE`:  Largest magnitude (default).\n    - `LARGEST_REAL`:       Largest real parts.\n    - `LARGEST_IMAGINARY`:  Largest imaginary parts in magnitude.\n    - `SMALLEST_MAGNITUDE`: Smallest magnitude.\n    - `SMALLEST_REAL`:      Smallest real parts.\n    - `SMALLEST_IMAGINARY`: Smallest imaginary parts in magnitude.\n    - `TARGET_MAGNITUDE`:   Closest to target (in magnitude).\n    - `TARGET_REAL`:        Real part closest to target.\n    - `TARGET_IMAGINARY`:   Imaginary part closest to target.\n    - `USER`:               User-defined criterion.\n    ";
static const char __pyx_k_PEP_error_type_to_assess_accura[] = "\n    PEP error type to assess accuracy of computed solutions\n\n    - `ABSOLUTE`:  Absolute error.\n    - `RELATIVE`:  Relative error.\n    - `BACKWARD`:  Backward error.\n    ";
static const char __pyx_k_PEP_problem_type_GENERAL_No_str[] = "\n    PEP problem type\n\n    - `GENERAL`:      No structure.\n    - `HERMITIAN`:    Hermitian structure.\n    - `GYROSCOPIC`:   Hamiltonian structure.\n    ";
static const char __pyx_k_PEP_refinement_strategy_NONE_No[] = "\n    PEP refinement strategy\n\n    - `NONE`:     No refinement.\n    - `SIMPLE`:   Refine eigenpairs one by one.\n    - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).\n    ";
static const char __pyx_k_PEP_scaling_strategy_NONE_No_sc[] = "\n    PEP scaling strategy\n\n    - `NONE`:     No scaling.\n    - `SCALAR`:   Parameter scaling.\n    - `DIAGONAL`: Diagonal scaling.\n    - `BOTH`:     Both parameter and diagonal scaling.\n    ";
static const char __pyx_k_PEP_type_Polynomial_eigensolver[] = "\n    PEP type\n\n    Polynomial eigensolvers.\n\n    - `LINEAR`:       Linearization via EPS.\n    - `QARNOLDI`:     Q-Arnoldi for quadratic problems.\n    - `TOAR`:         Two-level orthogonal Arnoldi.\n    - `STOAR`:        Symmetric TOAR.\n    - `JD`:           Polynomial Jacobi-Davidson.\n    ";
static const char __pyx_k_ST_matrix_mode_COPY_A_working_c[] = "\n    ST matrix mode\n\n    - `COPY`:    A working copy of the matrix is created.\n    - `INPLACE`: The operation is computed in-place.\n    - `SHELL`:   The matrix ``A-sigma*B`` is handled as an\n      implicit matrix.\n    ";
static const char __pyx_k_ST_types_SHELL_User_defined_SHI[] = "\n    ST types\n\n    - `SHELL`:  User-defined.\n    - `SHIFT`:  Shift from origin.\n    - `SINVERT`: Shift-and-invert.\n    - `CAYLEY`: Cayley transform.\n    - `PRECOND`: Preconditioner.\n    ";
static const char __pyx_k_SVD_convergence_reasons_CONVERG[] = "\n    SVD convergence reasons\n\n    - `CONVERGED_TOL`:\n    - `CONVERGED_USER`:\n    - `DIVERGED_ITS`:\n    - `DIVERGED_BREAKDOWN`:\n    - `CONVERGED_ITERATING`:\n    ";
static const char __pyx_k_SVD_desired_piece_of_spectrum_L[] = "\n    SVD desired piece of spectrum\n\n    - `LARGEST`:  largest singular values.\n    - `SMALLEST`: smallest singular values.\n    ";
static const char __pyx_k_SVD_error_type_to_assess_accura[] = "\n    SVD error type to assess accuracy of computed solutions\n\n    - `ABSOLUTE`:  Absolute error.\n    - `RELATIVE`:  Relative error.\n    ";
static const char __pyx_k_SVD_types_CROSS_Eigenproblem_wi[] = "\n    SVD types\n\n    - `CROSS`:     Eigenproblem with the cross-product matrix.\n    - `CYCLIC`:    Eigenproblem with the cyclic matrix.\n    - `LAPACK`:    Wrappers to dense SVD solvers in Lapack.\n    - `LANCZOS`:   Lanczos.\n    - `TRLANCZOS`: Thick-restart Lanczos.\n    ";
static const char __pyx_k_Scalable_Library_for_Eigenvalue[] = "\nScalable Library for Eigenvalue Problem Computations.\n";
static const char __pyx_k_Scheme_for_solving_linear_syste[] = "\n    Scheme for solving linear systems during iterative refinement\n\n    - `SCHUR`:    Schur complement.\n    - `MBE`:      Mixed block elimination.\n    - `EXPLICIT`: Build the explicit matrix.\n    ";
static const char __pyx_k_To_refer_to_one_of_the_matrices[] = "\n    To refer to one of the matrices stored internally in DS\n\n    - `A`:  first matrix of eigenproblem/singular value problem.\n    - `B`:  second matrix of a generalized eigenproblem.\n    - `C`:  third matrix of a quadratic eigenproblem.\n    - `T`:  tridiagonal matrix.\n    - `D`:  diagonal matrix.\n    - `Q`:  orthogonal matrix of (right) Schur vectors.\n    - `Z`:  orthogonal matrix of left Schur vectors.\n    - `X`:  right eigenvectors.\n    - `Y`:  left eigenvectors.\n    - `U`:  left singular vectors.\n    - `VT`: right singular vectors.\n    - `W`:  workspace matrix.\n    ";
static const char __pyx_k_home_dalcinl_Devel_slepc4py_dev[] = "/home/dalcinl/Devel/slepc4py-dev/src/SLEPc/SLEPc.pyx";
static const char __pyx_k_local_and_global_sizes_cannot_be[] = "local and global sizes cannot be both 'DECIDE'";
static PyObject *__pyx_n_s_A;
static PyObject *__pyx_n_s_ABS;
static PyObject *__pyx_n_s_ABSOLUTE;
static PyObject *__pyx_n_s_ADD;
static PyObject *__pyx_n_s_ALL;
static PyObject *__pyx_n_s_ALWAYS;
static PyObject *__pyx_n_s_ARNOLDI;
static PyObject *__pyx_n_s_ARPACK;
static PyObject *__pyx_n_s_Au;
static PyObject *__pyx_n_s_B;
static PyObject *__pyx_n_s_BACKWARD;
static PyObject *__pyx_n_s_BLOPEX;
static PyObject *__pyx_n_s_BLZPACK;
static PyObject *__pyx_n_s_BOTH;
static PyObject *__pyx_n_s_BVOrthogBlockType;
static PyObject *__pyx_n_s_BVOrthogRefineType;
static PyObject *__pyx_n_s_BVOrthogType;
static PyObject *__pyx_n_s_BVType;
static PyObject *__pyx_kp_s_BV_block_orthogonalization_type;
static PyObject *__pyx_kp_s_BV_orthogonalization_refinement;
static PyObject *__pyx_kp_s_BV_orthogonalization_types_CGS;
static PyObject *__pyx_kp_s_BV_type;
static PyObject *__pyx_n_s_Balance;
static PyObject *__pyx_n_s_Basis;
static PyObject *__pyx_n_s_BlockType;
static PyObject *__pyx_n_s_Bu;
static PyObject *__pyx_n_s_C;
static PyObject *__pyx_n_s_CAYLEY;
static PyObject *__pyx_n_s_CGS;
static PyObject *__pyx_n_s_CHEBYSHEV1;
static PyObject *__pyx_n_s_CHEBYSHEV2;
static PyObject *__pyx_n_s_CHOL;
static PyObject *__pyx_n_s_CISS;
static PyObject *__pyx_n_s_COMBINE;
static PyObject *__pyx_n_s_COMM_NULL;
static PyObject *__pyx_n_s_COMM_SELF;
static PyObject *__pyx_n_s_COMM_WORLD;
static PyObject *__pyx_n_s_COMPOSE;
static PyObject *__pyx_n_s_CONDENSED;
static PyObject *__pyx_n_s_CONSTANT;
static PyObject *__pyx_n_s_CONTIGUOUS;
static PyObject *__pyx_n_s_CONVERGED_ITERATING;
static PyObject *__pyx_n_s_CONVERGED_ITS;
static PyObject *__pyx_n_s_CONVERGED_TOL;
static PyObject *__pyx_n_s_CONVERGED_USER;
static PyObject *__pyx_n_s_COPY;
static PyObject *__pyx_n_s_CROSS;
static PyObject *__pyx_n_s_CYCLIC;
static PyObject *__pyx_n_s_CombineType;
static PyObject *__pyx_n_s_Conv;
static PyObject *__pyx_n_s_ConvergedReason;
static PyObject *__pyx_n_s_D;
static PyObject *__pyx_n_s_DECIDE;
static PyObject *__pyx_n_s_DEFAULT;
static PyObject *__pyx_n_s_DELAYED;
static PyObject *__pyx_n_s_DETERMINE;
static PyObject *__pyx_n_s_DIAGONAL;
static PyObject *__pyx_n_s_DIVERGED_BREAKDOWN;
static PyObject *__pyx_n_s_DIVERGED_ITS;
static PyObject *__pyx_n_s_DIVERGED_LINEAR_SOLVE;
static PyObject *__pyx_n_s_DIVERGED_SYMMETRY_LOST;
static PyObject *__pyx_n_s_DIVIDE;
static PyObject *__pyx_n_s_DSMatType;
static PyObject *__pyx_n_s_DSStateType;
static PyObject *__pyx_n_s_DSType;
static PyObject *__pyx_kp_s_DS_state_types_RAW_Not_processe;
static PyObject *__pyx_kp_s_DS_type;
static PyObject *__pyx_n_s_Dl;
static PyObject *__pyx_n_s_Dr;
static PyObject *__pyx_n_s_ELLIPSE;
static PyObject *__pyx_n_s_EPSBalance;
static PyObject *__pyx_n_s_EPSConv;
static PyObject *__pyx_n_s_EPSConvergedReason;
static PyObject *__pyx_n_s_EPSErrorType;
static PyObject *__pyx_n_s_EPSExtraction;
static PyObject *__pyx_n_s_EPSLanczosReorthogType;
static PyObject *__pyx_n_s_EPSPowerShiftType;
static PyObject *__pyx_n_s_EPSProblemType;
static PyObject *__pyx_n_s_EPSType;
static PyObject *__pyx_n_s_EPSWhich;
static PyObject *__pyx_kp_s_EPS_Lanczos_reorthogonalization;
static PyObject *__pyx_kp_s_EPS_Power_shift_type_CONSTANT_R;
static PyObject *__pyx_kp_s_EPS_convergence_reasons_CONVERG;
static PyObject *__pyx_kp_s_EPS_convergence_test_ABS_REL_NO;
static PyObject *__pyx_kp_s_EPS_desired_piece_of_spectrum_L;
static PyObject *__pyx_kp_s_EPS_error_type_to_assess_accura;
static PyObject *__pyx_kp_s_EPS_extraction_technique_RITZ_S;
static PyObject *__pyx_kp_s_EPS_problem_type_HEP_Hermitian;
static PyObject *__pyx_kp_s_EPS_type_Native_sparse_eigensol;
static PyObject *__pyx_kp_s_EPS_type_of_balancing_used_for;
static PyObject *__pyx_n_s_EXP;
static PyObject *__pyx_n_s_EXPLICIT;
static PyObject *__pyx_n_s_EXPOKIT;
static PyObject *__pyx_n_s_Error;
static PyObject *__pyx_n_s_ErrorType;
static PyObject *__pyx_n_s_Extract;
static PyObject *__pyx_n_s_Extraction;
static PyObject *__pyx_kp_s_Extraction_strategy_used_to_obt;
static PyObject *__pyx_n_s_F;
static PyObject *__pyx_n_s_FEAST;
static PyObject *__pyx_n_s_FNCombineType;
static PyObject *__pyx_n_s_FNType;
static PyObject *__pyx_kp_s_FN_type;
static PyObject *__pyx_kp_s_FN_type_of_combination_of_child;
static PyObject *__pyx_n_s_FULL;
static PyObject *__pyx_n_s_GD;
static PyObject *__pyx_n_s_GENERAL;
static PyObject *__pyx_n_s_GHEP;
static PyObject *__pyx_n_s_GHIEP;
static PyObject *__pyx_n_s_GNHEP;
static PyObject *__pyx_n_s_GS;
static PyObject *__pyx_n_s_GYROSCOPIC;
static PyObject *__pyx_n_s_HARMONIC;
static PyObject *__pyx_n_s_HARMONIC_LARGEST;
static PyObject *__pyx_n_s_HARMONIC_RELATIVE;
static PyObject *__pyx_n_s_HARMONIC_RIGHT;
static PyObject *__pyx_n_s_HEP;
static PyObject *__pyx_n_s_HERMITE;
static PyObject *__pyx_n_s_HERMITIAN;
static PyObject *__pyx_n_s_IFNEEDED;
static PyObject *__pyx_n_s_INPLACE;
static PyObject *__pyx_n_s_INTERMEDIATE;
static PyObject *__pyx_n_s_INTERPOL;
static PyObject *__pyx_n_s_INTERVAL;
static PyObject *__pyx_n_s_INVSQRT;
static PyObject *__pyx_n_s_ITERATING;
static PyObject *__pyx_n_s_J;
static PyObject *__pyx_n_s_JD;
static PyObject *__pyx_n_s_KRYLOV;
static PyObject *__pyx_n_s_KRYLOVSCHUR;
static PyObject *__pyx_n_s_LAGUERRE;
static PyObject *__pyx_n_s_LANCZOS;
static PyObject *__pyx_n_s_LAPACK;
static PyObject *__pyx_n_s_LARGEST;
static PyObject *__pyx_n_s_LARGEST_IMAGINARY;
static PyObject *__pyx_n_s_LARGEST_MAGNITUDE;
static PyObject *__pyx_n_s_LARGEST_REAL;
static PyObject *__pyx_n_s_LEGENDRE;
static PyObject *__pyx_n_s_LINEAR;
static PyObject *__pyx_n_s_LOBPCG;
static PyObject *__pyx_n_s_LOCAL;
static PyObject *__pyx_n_s_LOG;
static PyObject *__pyx_n_s_LanczosReorthogType;
static PyObject *__pyx_n_s_MAT;
static PyObject *__pyx_n_s_MBE;
static PyObject *__pyx_n_s_MFNConvergedReason;
static PyObject *__pyx_n_s_MFNType;
static PyObject *__pyx_kp_s_MFN_type_Action_of_a_matrix_fun;
static PyObject *__pyx_n_s_MGS;
static PyObject *__pyx_n_s_MONOMIAL;
static PyObject *__pyx_n_s_MULTIPLE;
static PyObject *__pyx_n_s_MULTIPLY;
static PyObject *__pyx_n_s_MatMode;
static PyObject *__pyx_n_s_MatType;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_NARNOLDI;
static PyObject *__pyx_n_s_NEP;
static PyObject *__pyx_n_s_NEPConvergedReason;
static PyObject *__pyx_n_s_NEPErrorType;
static PyObject *__pyx_n_s_NEPRefine;
static PyObject *__pyx_n_s_NEPRefineScheme;
static PyObject *__pyx_n_s_NEPType;
static PyObject *__pyx_n_s_NEPWhich;
static PyObject *__pyx_kp_s_NEP_error_type_to_assess_accura;
static PyObject *__pyx_kp_s_NEP_refinement_strategy_NONE_No;
static PyObject *__pyx_kp_s_NEP_type_Nonlinear_eigensolvers;
static PyObject *__pyx_n_s_NEVER;
static PyObject *__pyx_n_s_NHEP;
static PyObject *__pyx_n_s_NLEIGS;
static PyObject *__pyx_n_s_NONE;
static PyObject *__pyx_n_s_NORM;
static PyObject *__pyx_n_s_ONESIDE;
static PyObject *__pyx_n_s_OrthogBlockType;
static PyObject *__pyx_n_s_OrthogRefineType;
static PyObject *__pyx_n_s_OrthogType;
static PyObject *__pyx_n_s_P;
static PyObject *__pyx_n_s_PARTIAL;
static PyObject *__pyx_n_s_PEP;
static PyObject *__pyx_n_s_PEPBasis;
static PyObject *__pyx_n_s_PEPConv;
static PyObject *__pyx_n_s_PEPConvergedReason;
static PyObject *__pyx_n_s_PEPErrorType;
static PyObject *__pyx_n_s_PEPExtract;
static PyObject *__pyx_n_s_PEPProblemType;
static PyObject *__pyx_n_s_PEPRefine;
static PyObject *__pyx_n_s_PEPRefineScheme;
static PyObject *__pyx_n_s_PEPScale;
static PyObject *__pyx_n_s_PEPType;
static PyObject *__pyx_n_s_PEPWhich;
static PyObject *__pyx_kp_s_PEP_convergence_reasons_CONVERG;
static PyObject *__pyx_kp_s_PEP_convergence_test_ABS_REL_NO;
static PyObject *__pyx_kp_s_PEP_desired_part_of_spectrum_LA;
static PyObject *__pyx_kp_s_PEP_error_type_to_assess_accura;
static PyObject *__pyx_kp_s_PEP_problem_type_GENERAL_No_str;
static PyObject *__pyx_kp_s_PEP_refinement_strategy_NONE_No;
static PyObject *__pyx_kp_s_PEP_scaling_strategy_NONE_No_sc;
static PyObject *__pyx_kp_s_PEP_type_Polynomial_eigensolver;
static PyObject *__pyx_n_s_PERIODIC;
static PyObject *__pyx_n_s_PGNHEP;
static PyObject *__pyx_n_s_PHI;
static PyObject *__pyx_n_s_POLYGON;
static PyObject *__pyx_n_s_POWER;
static PyObject *__pyx_n_s_PRECOND;
static PyObject *__pyx_n_s_PRIMME;
static PyObject *__pyx_n_s_PowerShiftType;
static PyObject *__pyx_n_s_ProblemType;
static PyObject *__pyx_n_s_Q;
static PyObject *__pyx_n_s_QARNOLDI;
static PyObject *__pyx_n_s_R;
static PyObject *__pyx_n_s_RATIONAL;
static PyObject *__pyx_n_s_RAW;
static PyObject *__pyx_n_s_RAYLEIGH;
static PyObject *__pyx_n_s_REFINED;
static PyObject *__pyx_n_s_REFINED_HARMONIC;
static PyObject *__pyx_n_s_REL;
static PyObject *__pyx_n_s_RELATIVE;
static PyObject *__pyx_n_s_RESIDUAL;
static PyObject *__pyx_n_s_RGType;
static PyObject *__pyx_kp_s_RG_type;
static PyObject *__pyx_n_s_RII;
static PyObject *__pyx_n_s_RING;
static PyObject *__pyx_n_s_RITZ;
static PyObject *__pyx_n_s_RQCG;
static PyObject *__pyx_n_s_Refine;
static PyObject *__pyx_n_s_RefineScheme;
static PyObject *__pyx_n_s_RefineType;
static PyObject *__pyx_n_s_SCALAR;
static PyObject *__pyx_n_s_SCHUR;
static PyObject *__pyx_n_s_SELECTIVE;
static PyObject *__pyx_n_s_SHELL;
static PyObject *__pyx_n_s_SHIFT;
static PyObject *__pyx_n_s_SIMPLE;
static PyObject *__pyx_n_s_SINVERT;
static PyObject *__pyx_n_s_SLP;
static PyObject *__pyx_n_s_SMALLEST;
static PyObject *__pyx_n_s_SMALLEST_IMAGINARY;
static PyObject *__pyx_n_s_SMALLEST_MAGNITUDE;
static PyObject *__pyx_n_s_SMALLEST_REAL;
static PyObject *__pyx_n_s_SQRT;
static PyObject *__pyx_n_s_STMatMode;
static PyObject *__pyx_n_s_STOAR;
static PyObject *__pyx_n_s_STRUCTURED;
static PyObject *__pyx_n_s_STType;
static PyObject *__pyx_kp_s_ST_matrix_mode_COPY_A_working_c;
static PyObject *__pyx_kp_s_ST_types_SHELL_User_defined_SHI;
static PyObject *__pyx_n_s_SUBSPACE;
static PyObject *__pyx_n_s_SVD;
static PyObject *__pyx_n_s_SVDConvergedReason;
static PyObject *__pyx_n_s_SVDErrorType;
static PyObject *__pyx_n_s_SVDType;
static PyObject *__pyx_n_s_SVDWhich;
static PyObject *__pyx_kp_s_SVD_convergence_reasons_CONVERG;
static PyObject *__pyx_kp_s_SVD_desired_piece_of_spectrum_L;
static PyObject *__pyx_kp_s_SVD_error_type_to_assess_accura;
static PyObject *__pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi;
static PyObject *__pyx_n_s_SVEC;
static PyObject *__pyx_kp_s_Scalable_Library_for_Eigenvalue;
static PyObject *__pyx_n_s_Scale;
static PyObject *__pyx_kp_s_Scheme_for_solving_linear_syste;
static PyObject *__pyx_n_s_StateType;
static PyObject *__pyx_n_s_T;
static PyObject *__pyx_n_s_TARGET_IMAGINARY;
static PyObject *__pyx_n_s_TARGET_MAGNITUDE;
static PyObject *__pyx_n_s_TARGET_REAL;
static PyObject *__pyx_n_s_TOAR;
static PyObject *__pyx_n_s_TRLAN;
static PyObject *__pyx_n_s_TRLANCZOS;
static PyObject *__pyx_n_s_TRUNCATED;
static PyObject *__pyx_n_s_TWOSIDE;
static PyObject *__pyx_kp_s_To_refer_to_one_of_the_matrices;
static PyObject *__pyx_n_s_Type;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_U;
static PyObject *__pyx_n_s_USER;
static PyObject *__pyx_n_s_V;
static PyObject *__pyx_n_s_VECS;
static PyObject *__pyx_n_s_VT;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Vi;
static PyObject *__pyx_n_s_Vr;
static PyObject *__pyx_n_s_W;
static PyObject *__pyx_n_s_WILKINSON;
static PyObject *__pyx_n_s_Which;
static PyObject *__pyx_n_s_X;
static PyObject *__pyx_n_s_Y;
static PyObject *__pyx_n_s_Z;
static PyObject *__pyx_kp_s__2;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_alpha;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_author;
static PyObject *__pyx_n_s_authorinfo;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_balance;
static PyObject *__pyx_n_s_basis;
static PyObject *__pyx_n_s_beta;
static PyObject *__pyx_n_s_block;
static PyObject *__pyx_n_s_bv;
static PyObject *__pyx_n_s_bv_type;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_s_center;
static PyObject *__pyx_n_s_cform;
static PyObject *__pyx_n_s_comm;
static PyObject *__pyx_n_s_comp;
static PyObject *__pyx_n_s_conv;
static PyObject *__pyx_n_s_create;
static PyObject *__pyx_n_s_createDense;
static PyObject *__pyx_n_s_cutoff;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_s_date;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_delayed;
static PyObject *__pyx_n_s_detect;
static PyObject *__pyx_n_s_devel;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_s_ds;
static PyObject *__pyx_n_s_ds_type;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_eps;
static PyObject *__pyx_n_s_eps_type;
static PyObject *__pyx_n_s_eta;
static PyObject *__pyx_n_s_etype;
static PyObject *__pyx_n_s_ext;
static PyObject *__pyx_n_s_extraction;
static PyObject *__pyx_n_s_f;
static PyObject *__pyx_n_s_finalize;
static PyObject *__pyx_n_s_flag;
static PyObject *__pyx_n_s_fn;
static PyObject *__pyx_n_s_fn_type;
static PyObject *__pyx_n_s_function;
static PyObject *__pyx_n_s_getActiveColumns;
static PyObject *__pyx_n_s_getBV;
static PyObject *__pyx_n_s_getExtraction;
static PyObject *__pyx_n_s_getKSP;
static PyObject *__pyx_n_s_getMatMode;
static PyObject *__pyx_n_s_getProblemType;
static PyObject *__pyx_n_s_getST;
static PyObject *__pyx_n_s_getShift;
static PyObject *__pyx_n_s_getTarget;
static PyObject *__pyx_n_s_getTolerances;
static PyObject *__pyx_n_s_getTransposeMode;
static PyObject *__pyx_n_s_getVersion;
static PyObject *__pyx_n_s_getVersionInfo;
static PyObject *__pyx_n_s_getWhichEigenpairs;
static PyObject *__pyx_n_s_getWhichSingularTriplets;
static PyObject *__pyx_n_s_ghostUpdate;
static PyObject *__pyx_n_s_globalup;
static PyObject *__pyx_kp_s_home_dalcinl_Devel_slepc4py_dev;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_indef;
static PyObject *__pyx_n_s_initialize;
static PyObject *__pyx_n_s_inta;
static PyObject *__pyx_n_s_intb;
static PyObject *__pyx_n_s_iterations;
static PyObject *__pyx_n_s_its;
static PyObject *__pyx_n_s_j;
static PyObject *__pyx_n_s_jacobian;
static PyObject *__pyx_n_s_k;
static PyObject *__pyx_n_s_kargs;
static PyObject *__pyx_n_s_keep;
static PyObject *__pyx_n_s_ksp;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_lag;
static PyObject *__pyx_n_s_lbda;
static PyObject *__pyx_n_s_ld;
static PyObject *__pyx_kp_s_local_and_global_sizes_cannot_be;
static PyObject *__pyx_n_s_lock;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_major;
static PyObject *__pyx_n_s_mat;
static PyObject *__pyx_n_s_max_it;
static PyObject *__pyx_n_s_maxit;
static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_meth;
static PyObject *__pyx_n_s_mfn_type;
static PyObject *__pyx_n_s_minor;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_mpd;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_ncv;
static PyObject *__pyx_n_s_nep_type;
static PyObject *__pyx_n_s_nev;
static PyObject *__pyx_n_s_norm_type;
static PyObject *__pyx_n_s_npart;
static PyObject *__pyx_n_s_nrest;
static PyObject *__pyx_n_s_nsv;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_operators;
static PyObject *__pyx_n_s_orth;
static PyObject *__pyx_n_s_patch;
static PyObject *__pyx_n_s_pep_type;
static PyObject *__pyx_n_s_petsc4py_PETSc;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_problem_type;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_q;
static PyObject *__pyx_n_s_qualname;
static PyObject *__pyx_n_s_radius;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_ready;
static PyObject *__pyx_n_s_ref;
static PyObject *__pyx_n_s_refine;
static PyObject *__pyx_n_s_release;
static PyObject *__pyx_n_s_reorthog;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_rg;
static PyObject *__pyx_n_s_rg_type;
static PyObject *__pyx_n_s_s;
static PyObject *__pyx_n_s_scale;
static PyObject *__pyx_n_s_scheme;
static PyObject *__pyx_n_s_seq;
static PyObject *__pyx_n_s_setArray;
static PyObject *__pyx_n_s_setBV;
static PyObject *__pyx_n_s_setExtraction;
static PyObject *__pyx_n_s_setKSP;
static PyObject *__pyx_n_s_setMatMode;
static PyObject *__pyx_n_s_setOrthogonalization;
static PyObject *__pyx_n_s_setProblemType;
static PyObject *__pyx_n_s_setST;
static PyObject *__pyx_n_s_setShift;
static PyObject *__pyx_n_s_setSizes;
static PyObject *__pyx_n_s_setTarget;
static PyObject *__pyx_n_s_setTolerances;
static PyObject *__pyx_n_s_setTransposeMode;
static PyObject *__pyx_n_s_setType;
static PyObject *__pyx_n_s_setUp;
static PyObject *__pyx_n_s_setWhichEigenpairs;
static PyObject *__pyx_n_s_setWhichSingularTriplets;
static PyObject *__pyx_n_s_shift;
static PyObject *__pyx_n_s_sizes;
static PyObject *__pyx_n_s_slepc4py_SLEPc;
static PyObject *__pyx_n_s_space;
static PyObject *__pyx_n_s_split;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_st_type;
static PyObject *__pyx_n_s_state;
static PyObject *__pyx_n_s_strip;
static PyObject *__pyx_n_s_structure;
static PyObject *__pyx_n_s_subint;
static PyObject *__pyx_n_s_subminor;
static PyObject *__pyx_n_s_svd_type;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_tau;
static PyObject *__pyx_n_s_tol;
static PyObject *__pyx_n_s_trackall;
static PyObject *__pyx_n_s_trueres;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_viewer;
static PyObject *__pyx_n_s_vscale;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_which;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_y;
static int __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self); /* proto */
static void __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_patch, PyObject *__pyx_v_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(CYTHON_UNUSED PyTypeObject *__pyx_v_cls); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_2view(struct PySlepcSTObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_6reset(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8create(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_10setType(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_st_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_12getType(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_shift); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_structure); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(struct PySlepcSTObject *__pyx_v_self, struct PyPetscKSPObject *__pyx_v_ksp); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(struct PySlepcSTObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44apply(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_tau); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(struct PySlepcSTObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_2view(struct PySlepcBVObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_6create(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10copy(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_result); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_12setType(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_bv_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14getType(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_w, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_refine, PyObject *__pyx_v_eta, PyObject *__pyx_v_block); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_mat, int __pyx_v_indef); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_alpha); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_44scale(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_s, PyObject *__pyx_v_W, int __pyx_v_orth); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_56dot(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_Y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta, struct PyPetscVecObject *__pyx_v_y, PyObject *__pyx_v_q); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_norm_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_68norm(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_norm_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(struct PySlepcBVObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_R, PyObject *__pyx_v_kargs); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_2view(struct PySlepcDSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_6reset(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_8create(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_10setType(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ds_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_12getType(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ld); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_24setState(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_26getState(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_m, PyObject *__pyx_v_l, PyObject *__pyx_v_k); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_meth); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comp); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ext); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ref); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(struct PySlepcDSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(struct PySlepcDSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_2view(struct PySlepcFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_6create(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_8setType(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_fn_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_10getType(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(struct PySlepcFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_2view(struct PySlepcRGObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_6create(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_8setType(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_rg_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_10getType(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comp); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_radius, PyObject *__pyx_v_vscale); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(struct PySlepcRGObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2view(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_8create(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_eps_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_problem_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_balance, PyObject *__pyx_v_iterations, PyObject *__pyx_v_cutoff); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_extraction); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_target); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_inta, PyObject *__pyx_v_intb); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trueres); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_shift); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_reorthog); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_keep); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_lock); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_npart); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_detect); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_V); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_a, struct PyPetscMatObject *__pyx_v_Au, PyObject *__pyx_v_t, PyObject *__pyx_v_b, struct PyPetscMatObject *__pyx_v_Bu, PyObject *__pyx_v_structure, PyObject *__pyx_v_globalup); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_subint); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nrest); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(struct PySlepcEPSObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2view(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_8create(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_svd_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_nsv, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_V, struct PySlepcBVObject *__pyx_v_U); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(struct PySlepcSVDObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_2view(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_8create(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_pep_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_basis); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_problem_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_conv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_alpha, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr, PyObject *__pyx_v_its, PyObject *__pyx_v_lbda); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_operators); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_cform); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_flag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_2view(struct PySlepcNEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_8create(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nep_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_which); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxit); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_lag); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_trackall); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_space); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(struct PySlepcNEPObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_function, struct PyPetscMatObject *__pyx_v_F, struct PyPetscMatObject *__pyx_v_P, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_jacobian, struct PyPetscMatObject *__pyx_v_J, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_A, PyObject *__pyx_v_f, PyObject *__pyx_v_structure); /* proto */
static int __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_2view(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_8create(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_comm); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_mfn_type); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_ncv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcFNObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_b, struct PyPetscVecObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(struct PySlepcMFNObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc__initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_8slepc4py_5SLEPc_2_finalize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_ST(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_BV(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_DS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_FN(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_RG(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_EPS(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_SVD(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_PEP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_NEP(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_MFN(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc__p_mem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_Sys(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_int_0;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_codeobj__7;
static PyObject *__pyx_codeobj__8;

/* "SLEPc/SLEPc.pyx":26
 *     ctypedef char const_char "const char"
 * 
 * cdef inline object bytes2str(const_char p[]):             # <<<<<<<<<<<<<<
 *      if p == NULL:
 *          return None
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_bytes2str(const char *__pyx_v_p) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("bytes2str", 0);

  /* "SLEPc/SLEPc.pyx":27
 * 
 * cdef inline object bytes2str(const_char p[]):
 *      if p == NULL:             # <<<<<<<<<<<<<<
 *          return None
 *      cdef bytes s = <char*>p
 */
  __pyx_t_1 = ((__pyx_v_p == NULL) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":28
 * cdef inline object bytes2str(const_char p[]):
 *      if p == NULL:
 *          return None             # <<<<<<<<<<<<<<
 *      cdef bytes s = <char*>p
 *      if isinstance(s, str):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "SLEPc/SLEPc.pyx":27
 * 
 * cdef inline object bytes2str(const_char p[]):
 *      if p == NULL:             # <<<<<<<<<<<<<<
 *          return None
 *      cdef bytes s = <char*>p
 */
  }

  /* "SLEPc/SLEPc.pyx":29
 *      if p == NULL:
 *          return None
 *      cdef bytes s = <char*>p             # <<<<<<<<<<<<<<
 *      if isinstance(s, str):
 *          return s
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)__pyx_v_p)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_s = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":30
 *          return None
 *      cdef bytes s = <char*>p
 *      if isinstance(s, str):             # <<<<<<<<<<<<<<
 *          return s
 *      else:
 */
  __pyx_t_1 = PyString_Check(__pyx_v_s); 
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (__pyx_t_3) {

    /* "SLEPc/SLEPc.pyx":31
 *      cdef bytes s = <char*>p
 *      if isinstance(s, str):
 *          return s             # <<<<<<<<<<<<<<
 *      else:
 *          return s.decode()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_s);
    __pyx_r = __pyx_v_s;
    goto __pyx_L0;

    /* "SLEPc/SLEPc.pyx":30
 *          return None
 *      cdef bytes s = <char*>p
 *      if isinstance(s, str):             # <<<<<<<<<<<<<<
 *          return s
 *      else:
 */
  }

  /* "SLEPc/SLEPc.pyx":33
 *          return s
 *      else:
 *          return s.decode()             # <<<<<<<<<<<<<<
 * 
 * cdef inline object str2bytes(object s, const_char *p[]):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_s, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "SLEPc/SLEPc.pyx":26
 *     ctypedef char const_char "const char"
 * 
 * cdef inline object bytes2str(const_char p[]):             # <<<<<<<<<<<<<<
 *      if p == NULL:
 *          return None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.bytes2str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":35
 *          return s.decode()
 * 
 * cdef inline object str2bytes(object s, const_char *p[]):             # <<<<<<<<<<<<<<
 *     if s is None:
 *         p[0] = NULL
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_str2bytes(PyObject *__pyx_v_s, const char **__pyx_v_p) {
  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;
  char *__pyx_t_6;
  __Pyx_RefNannySetupContext("str2bytes", 0);
  __Pyx_INCREF(__pyx_v_s);

  /* "SLEPc/SLEPc.pyx":36
 * 
 * cdef inline object str2bytes(object s, const_char *p[]):
 *     if s is None:             # <<<<<<<<<<<<<<
 *         p[0] = NULL
 *         return None
 */
  __pyx_t_1 = (__pyx_v_s == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "SLEPc/SLEPc.pyx":37
 * cdef inline object str2bytes(object s, const_char *p[]):
 *     if s is None:
 *         p[0] = NULL             # <<<<<<<<<<<<<<
 *         return None
 *     if not isinstance(s, bytes):
 */
    (__pyx_v_p[0]) = NULL;

    /* "SLEPc/SLEPc.pyx":38
 *     if s is None:
 *         p[0] = NULL
 *         return None             # <<<<<<<<<<<<<<
 *     if not isinstance(s, bytes):
 *         s = s.encode()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "SLEPc/SLEPc.pyx":36
 * 
 * cdef inline object str2bytes(object s, const_char *p[]):
 *     if s is None:             # <<<<<<<<<<<<<<
 *         p[0] = NULL
 *         return None
 */
  }

  /* "SLEPc/SLEPc.pyx":39
 *         p[0] = NULL
 *         return None
 *     if not isinstance(s, bytes):             # <<<<<<<<<<<<<<
 *         s = s.encode()
 *     p[0] = <const_char*>(<char*>s)
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_s); 
  __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":40
 *         return None
 *     if not isinstance(s, bytes):
 *         s = s.encode()             # <<<<<<<<<<<<<<
 *     p[0] = <const_char*>(<char*>s)
 *     return s
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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(4, 40, __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(4, 40, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "SLEPc/SLEPc.pyx":39
 *         p[0] = NULL
 *         return None
 *     if not isinstance(s, bytes):             # <<<<<<<<<<<<<<
 *         s = s.encode()
 *     p[0] = <const_char*>(<char*>s)
 */
  }

  /* "SLEPc/SLEPc.pyx":41
 *     if not isinstance(s, bytes):
 *         s = s.encode()
 *     p[0] = <const_char*>(<char*>s)             # <<<<<<<<<<<<<<
 *     return s
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_s); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(4, 41, __pyx_L1_error)
  (__pyx_v_p[0]) = ((const char *)((char *)__pyx_t_6));

  /* "SLEPc/SLEPc.pyx":42
 *         s = s.encode()
 *     p[0] = <const_char*>(<char*>s)
 *     return s             # <<<<<<<<<<<<<<
 * 
 * cdef inline object S_(const_char p[]):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_s);
  __pyx_r = __pyx_v_s;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":35
 *          return s.decode()
 * 
 * cdef inline object str2bytes(object s, const_char *p[]):             # <<<<<<<<<<<<<<
 *     if s is None:
 *         p[0] = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.str2bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":44
 *     return s
 * 
 * cdef inline object S_(const_char p[]):             # <<<<<<<<<<<<<<
 *      if p == NULL: return None
 *      cdef object s = <char*>p
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_S_(const char *__pyx_v_p) {
  PyObject *__pyx_v_s = 0;
  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;
  __Pyx_RefNannySetupContext("S_", 0);

  /* "SLEPc/SLEPc.pyx":45
 * 
 * cdef inline object S_(const_char p[]):
 *      if p == NULL: return None             # <<<<<<<<<<<<<<
 *      cdef object s = <char*>p
 *      return s if isinstance(s, str) else s.decode()
 */
  __pyx_t_1 = ((__pyx_v_p == NULL) != 0);
  if (__pyx_t_1) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
  }

  /* "SLEPc/SLEPc.pyx":46
 * cdef inline object S_(const_char p[]):
 *      if p == NULL: return None
 *      cdef object s = <char*>p             # <<<<<<<<<<<<<<
 *      return s if isinstance(s, str) else s.decode()
 * 
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(((char *)__pyx_v_p)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_s = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":47
 *      if p == NULL: return None
 *      cdef object s = <char*>p
 *      return s if isinstance(s, str) else s.decode()             # <<<<<<<<<<<<<<
 * 
 * include "allocate.pxi"
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyString_Check(__pyx_v_s); 
  if ((__pyx_t_1 != 0)) {
    __Pyx_INCREF(__pyx_v_s);
    __pyx_t_2 = __pyx_v_s;
  } else {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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(4, 47, __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(4, 47, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":44
 *     return s
 * 
 * cdef inline object S_(const_char p[]):             # <<<<<<<<<<<<<<
 *      if p == NULL: return None
 *      cdef object s = <char*>p
 */

  /* 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_AddTraceback("slepc4py.SLEPc.S_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/allocate.pxi":13
 * cdef class _p_mem:
 *     cdef void *buf
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.buf = NULL
 *     def __dealloc__(self):
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_6_p_mem___cinit__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/allocate.pxi":14
 *     cdef void *buf
 *     def __cinit__(self):
 *         self.buf = NULL             # <<<<<<<<<<<<<<
 *     def __dealloc__(self):
 *         PyMem_Free(self.buf)
 */
  __pyx_v_self->buf = NULL;

  /* "SLEPc/allocate.pxi":13
 * cdef class _p_mem:
 *     cdef void *buf
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.buf = NULL
 *     def __dealloc__(self):
 */

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

/* "SLEPc/allocate.pxi":15
 *     def __cinit__(self):
 *         self.buf = NULL
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.buf)
 * 
 */

/* Python wrapper */
static void __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_v_self));

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

static void __pyx_pf_8slepc4py_5SLEPc_6_p_mem_2__dealloc__(struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "SLEPc/allocate.pxi":16
 *         self.buf = NULL
 *     def __dealloc__(self):
 *         PyMem_Free(self.buf)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object allocate(size_t n, void **buf):
 */
  PyMem_Free(__pyx_v_self->buf);

  /* "SLEPc/allocate.pxi":15
 *     def __cinit__(self):
 *         self.buf = NULL
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self.buf)
 * 
 */

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

/* "SLEPc/allocate.pxi":18
 *         PyMem_Free(self.buf)
 * 
 * cdef inline object allocate(size_t n, void **buf):             # <<<<<<<<<<<<<<
 *     cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem)
 *     ob.buf = PyMem_Malloc(<size_t>n)
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_allocate(size_t __pyx_v_n, void **__pyx_v_buf) {
  struct __pyx_obj_8slepc4py_5SLEPc__p_mem *__pyx_v_ob = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  void *__pyx_t_4;
  __Pyx_RefNannySetupContext("allocate", 0);

  /* "SLEPc/allocate.pxi":19
 * 
 * cdef inline object allocate(size_t n, void **buf):
 *     cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem)             # <<<<<<<<<<<<<<
 *     ob.buf = PyMem_Malloc(<size_t>n)
 *     if ob.buf == NULL: raise MemoryError
 */
  __pyx_t_1 = __pyx_tp_new_8slepc4py_5SLEPc__p_mem(((PyTypeObject *)__pyx_ptype_8slepc4py_5SLEPc__p_mem), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ob = ((struct __pyx_obj_8slepc4py_5SLEPc__p_mem *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/allocate.pxi":20
 * cdef inline object allocate(size_t n, void **buf):
 *     cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem)
 *     ob.buf = PyMem_Malloc(<size_t>n)             # <<<<<<<<<<<<<<
 *     if ob.buf == NULL: raise MemoryError
 *     if buf != NULL: buf[0] = ob.buf
 */
  __pyx_v_ob->buf = PyMem_Malloc(((size_t)__pyx_v_n));

  /* "SLEPc/allocate.pxi":21
 *     cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem)
 *     ob.buf = PyMem_Malloc(<size_t>n)
 *     if ob.buf == NULL: raise MemoryError             # <<<<<<<<<<<<<<
 *     if buf != NULL: buf[0] = ob.buf
 *     return ob
 */
  __pyx_t_3 = ((__pyx_v_ob->buf == NULL) != 0);
  if (__pyx_t_3) {
    PyErr_NoMemory(); __PYX_ERR(1, 21, __pyx_L1_error)
  }

  /* "SLEPc/allocate.pxi":22
 *     ob.buf = PyMem_Malloc(<size_t>n)
 *     if ob.buf == NULL: raise MemoryError
 *     if buf != NULL: buf[0] = ob.buf             # <<<<<<<<<<<<<<
 *     return ob
 * 
 */
  __pyx_t_3 = ((__pyx_v_buf != NULL) != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_v_ob->buf;
    (__pyx_v_buf[0]) = __pyx_t_4;
  }

  /* "SLEPc/allocate.pxi":23
 *     if ob.buf == NULL: raise MemoryError
 *     if buf != NULL: buf[0] = ob.buf
 *     return ob             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ob));
  __pyx_r = ((PyObject *)__pyx_v_ob);
  goto __pyx_L0;

  /* "SLEPc/allocate.pxi":18
 *         PyMem_Free(self.buf)
 * 
 * cdef inline object allocate(size_t n, void **buf):             # <<<<<<<<<<<<<<
 *     cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem)
 *     ob.buf = PyMem_Malloc(<size_t>n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":65
 * from petsc4py.PETSc import Error as PetscError
 * 
 * cdef inline int SETERR(int ierr) with gil:             # <<<<<<<<<<<<<<
 *     if (<void*>PetscError) != NULL:
 *         PyErr_SetObject(PetscError, <long>ierr)
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SETERR(int __pyx_v_ierr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("SETERR", 0);

  /* "SLEPc/SLEPc.pyx":66
 * 
 * cdef inline int SETERR(int ierr) with gil:
 *     if (<void*>PetscError) != NULL:             # <<<<<<<<<<<<<<
 *         PyErr_SetObject(PetscError, <long>ierr)
 *     else:
 */
  __pyx_t_1 = ((((void *)__pyx_v_8slepc4py_5SLEPc_PetscError) != NULL) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":67
 * cdef inline int SETERR(int ierr) with gil:
 *     if (<void*>PetscError) != NULL:
 *         PyErr_SetObject(PetscError, <long>ierr)             # <<<<<<<<<<<<<<
 *     else:
 *         PyErr_SetObject(<object>PyExc_RuntimeError, <long>ierr)
 */
    __pyx_t_2 = __pyx_v_8slepc4py_5SLEPc_PetscError;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    PyErr_SetObject(__pyx_t_2, __pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "SLEPc/SLEPc.pyx":66
 * 
 * cdef inline int SETERR(int ierr) with gil:
 *     if (<void*>PetscError) != NULL:             # <<<<<<<<<<<<<<
 *         PyErr_SetObject(PetscError, <long>ierr)
 *     else:
 */
    goto __pyx_L3;
  }

  /* "SLEPc/SLEPc.pyx":69
 *         PyErr_SetObject(PetscError, <long>ierr)
 *     else:
 *         PyErr_SetObject(<object>PyExc_RuntimeError, <long>ierr)             # <<<<<<<<<<<<<<
 *     return ierr
 * 
 */
  /*else*/ {
    __pyx_t_3 = ((PyObject *)PyExc_RuntimeError);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 69, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    PyErr_SetObject(__pyx_t_3, __pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "SLEPc/SLEPc.pyx":70
 *     else:
 *         PyErr_SetObject(<object>PyExc_RuntimeError, <long>ierr)
 *     return ierr             # <<<<<<<<<<<<<<
 * 
 * cdef inline int CHKERR(int ierr) nogil except -1:
 */
  __pyx_r = __pyx_v_ierr;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":65
 * from petsc4py.PETSc import Error as PetscError
 * 
 * cdef inline int SETERR(int ierr) with gil:             # <<<<<<<<<<<<<<
 *     if (<void*>PetscError) != NULL:
 *         PyErr_SetObject(PetscError, <long>ierr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("slepc4py.SLEPc.SETERR", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":72
 *     return ierr
 * 
 * cdef inline int CHKERR(int ierr) nogil except -1:             # <<<<<<<<<<<<<<
 *     if ierr == 0:
 *         return 0  # no error
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_CHKERR(int __pyx_v_ierr) {
  int __pyx_r;
  int __pyx_t_1;

  /* "SLEPc/SLEPc.pyx":73
 * 
 * cdef inline int CHKERR(int ierr) nogil except -1:
 *     if ierr == 0:             # <<<<<<<<<<<<<<
 *         return 0  # no error
 *     if ierr == PETSC_ERR_PYTHON:
 */
  __pyx_t_1 = ((__pyx_v_ierr == 0) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":74
 * cdef inline int CHKERR(int ierr) nogil except -1:
 *     if ierr == 0:
 *         return 0  # no error             # <<<<<<<<<<<<<<
 *     if ierr == PETSC_ERR_PYTHON:
 *         return -1 # Python error
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "SLEPc/SLEPc.pyx":73
 * 
 * cdef inline int CHKERR(int ierr) nogil except -1:
 *     if ierr == 0:             # <<<<<<<<<<<<<<
 *         return 0  # no error
 *     if ierr == PETSC_ERR_PYTHON:
 */
  }

  /* "SLEPc/SLEPc.pyx":75
 *     if ierr == 0:
 *         return 0  # no error
 *     if ierr == PETSC_ERR_PYTHON:             # <<<<<<<<<<<<<<
 *         return -1 # Python error
 *     SETERR(ierr)
 */
  __pyx_t_1 = ((__pyx_v_ierr == (-1)) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":76
 *         return 0  # no error
 *     if ierr == PETSC_ERR_PYTHON:
 *         return -1 # Python error             # <<<<<<<<<<<<<<
 *     SETERR(ierr)
 *     return -1
 */
    __pyx_r = -1;
    goto __pyx_L0;

    /* "SLEPc/SLEPc.pyx":75
 *     if ierr == 0:
 *         return 0  # no error
 *     if ierr == PETSC_ERR_PYTHON:             # <<<<<<<<<<<<<<
 *         return -1 # Python error
 *     SETERR(ierr)
 */
  }

  /* "SLEPc/SLEPc.pyx":77
 *     if ierr == PETSC_ERR_PYTHON:
 *         return -1 # Python error
 *     SETERR(ierr)             # <<<<<<<<<<<<<<
 *     return -1
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SETERR(__pyx_v_ierr);

  /* "SLEPc/SLEPc.pyx":78
 *         return -1 # Python error
 *     SETERR(ierr)
 *     return -1             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = -1;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":72
 *     return ierr
 * 
 * cdef inline int CHKERR(int ierr) nogil except -1:             # <<<<<<<<<<<<<<
 *     if ierr == 0:
 *         return 0  # no error
 */

  /* function exit code */
  __pyx_L0:;
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":96
 *     PetscScalar PyPetscScalar_AsPetscScalar(object) except*
 * 
 * cdef inline object toInt(PetscInt value):             # <<<<<<<<<<<<<<
 *     return value
 * cdef inline PetscInt asInt(object value) except? -1:
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toInt(PetscInt __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("toInt", 0);

  /* "SLEPc/SLEPc.pyx":97
 * 
 * cdef inline object toInt(PetscInt value):
 *     return value             # <<<<<<<<<<<<<<
 * cdef inline PetscInt asInt(object value) except? -1:
 *     return value
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PetscInt(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 97, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":96
 *     PetscScalar PyPetscScalar_AsPetscScalar(object) except*
 * 
 * cdef inline object toInt(PetscInt value):             # <<<<<<<<<<<<<<
 *     return value
 * cdef inline PetscInt asInt(object value) except? -1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.toInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":98
 * cdef inline object toInt(PetscInt value):
 *     return value
 * cdef inline PetscInt asInt(object value) except? -1:             # <<<<<<<<<<<<<<
 *     return value
 * 
 */

static CYTHON_INLINE PetscInt __pyx_f_8slepc4py_5SLEPc_asInt(PyObject *__pyx_v_value) {
  PetscInt __pyx_r;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  __Pyx_RefNannySetupContext("asInt", 0);

  /* "SLEPc/SLEPc.pyx":99
 *     return value
 * cdef inline PetscInt asInt(object value) except? -1:
 *     return value             # <<<<<<<<<<<<<<
 * 
 * cdef inline object toReal(PetscReal value):
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(4, 99, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":98
 * cdef inline object toInt(PetscInt value):
 *     return value
 * cdef inline PetscInt asInt(object value) except? -1:             # <<<<<<<<<<<<<<
 *     return value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.asInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1L;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":101
 *     return value
 * 
 * cdef inline object toReal(PetscReal value):             # <<<<<<<<<<<<<<
 *     return value
 * cdef inline PetscReal asReal(object value) except? -1:
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toReal(PetscReal __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("toReal", 0);

  /* "SLEPc/SLEPc.pyx":102
 * 
 * cdef inline object toReal(PetscReal value):
 *     return value             # <<<<<<<<<<<<<<
 * cdef inline PetscReal asReal(object value) except? -1:
 *     return value
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":101
 *     return value
 * 
 * cdef inline object toReal(PetscReal value):             # <<<<<<<<<<<<<<
 *     return value
 * cdef inline PetscReal asReal(object value) except? -1:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.toReal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":103
 * cdef inline object toReal(PetscReal value):
 *     return value
 * cdef inline PetscReal asReal(object value) except? -1:             # <<<<<<<<<<<<<<
 *     return value
 * 
 */

static CYTHON_INLINE PetscReal __pyx_f_8slepc4py_5SLEPc_asReal(PyObject *__pyx_v_value) {
  PetscReal __pyx_r;
  __Pyx_RefNannyDeclarations
  PetscReal __pyx_t_1;
  __Pyx_RefNannySetupContext("asReal", 0);

  /* "SLEPc/SLEPc.pyx":104
 *     return value
 * cdef inline PetscReal asReal(object value) except? -1:
 *     return value             # <<<<<<<<<<<<<<
 * 
 * cdef inline object toScalar(PetscScalar value):
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(4, 104, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":103
 * cdef inline object toReal(PetscReal value):
 *     return value
 * cdef inline PetscReal asReal(object value) except? -1:             # <<<<<<<<<<<<<<
 *     return value
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.asReal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1.0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":106
 *     return value
 * 
 * cdef inline object toScalar(PetscScalar value):             # <<<<<<<<<<<<<<
 *     return PyPetscScalar_FromPetscScalar(value)
 * cdef inline PetscScalar asScalar(object value) except*:
 */

static CYTHON_INLINE PyObject *__pyx_f_8slepc4py_5SLEPc_toScalar(PetscScalar __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("toScalar", 0);

  /* "SLEPc/SLEPc.pyx":107
 * 
 * cdef inline object toScalar(PetscScalar value):
 *     return PyPetscScalar_FromPetscScalar(value)             # <<<<<<<<<<<<<<
 * cdef inline PetscScalar asScalar(object value) except*:
 *     return PyPetscScalar_AsPetscScalar(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyPetscScalar_FromPetscScalar(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":106
 *     return value
 * 
 * cdef inline object toScalar(PetscScalar value):             # <<<<<<<<<<<<<<
 *     return PyPetscScalar_FromPetscScalar(value)
 * cdef inline PetscScalar asScalar(object value) except*:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.toScalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":108
 * cdef inline object toScalar(PetscScalar value):
 *     return PyPetscScalar_FromPetscScalar(value)
 * cdef inline PetscScalar asScalar(object value) except*:             # <<<<<<<<<<<<<<
 *     return PyPetscScalar_AsPetscScalar(value)
 * 
 */

static CYTHON_INLINE PetscScalar __pyx_f_8slepc4py_5SLEPc_asScalar(PyObject *__pyx_v_value) {
  PetscScalar __pyx_r;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  __Pyx_RefNannySetupContext("asScalar", 0);

  /* "SLEPc/SLEPc.pyx":109
 *     return PyPetscScalar_FromPetscScalar(value)
 * cdef inline PetscScalar asScalar(object value) except*:
 *     return PyPetscScalar_AsPetscScalar(value)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_1 = PyPetscScalar_AsPetscScalar(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 109, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":108
 * cdef inline object toScalar(PetscScalar value):
 *     return PyPetscScalar_FromPetscScalar(value)
 * cdef inline PetscScalar asScalar(object value) except*:             # <<<<<<<<<<<<<<
 *     return PyPetscScalar_AsPetscScalar(value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.asScalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcmpi.pxi":15
 * 
 * from petsc4py.PETSc cimport GetComm
 * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *:             # <<<<<<<<<<<<<<
 *      return GetComm(comm, defv)
 * 
 */

static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_def_Comm(PyObject *__pyx_v_comm, MPI_Comm __pyx_v_defv) {
  MPI_Comm __pyx_r;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  __Pyx_RefNannySetupContext("def_Comm", 0);

  /* "SLEPc/slepcmpi.pxi":16
 * from petsc4py.PETSc cimport GetComm
 * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *:
 *      return GetComm(comm, defv)             # <<<<<<<<<<<<<<
 * 
 * from petsc4py.PETSc cimport GetCommDefault
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_GetComm(__pyx_v_comm, __pyx_v_defv); if (unlikely(PyErr_Occurred())) __PYX_ERR(5, 16, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "SLEPc/slepcmpi.pxi":15
 * 
 * from petsc4py.PETSc cimport GetComm
 * cdef inline MPI_Comm def_Comm(object comm, MPI_Comm defv) except *:             # <<<<<<<<<<<<<<
 *      return GetComm(comm, defv)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.def_Comm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcmpi.pxi":19
 * 
 * from petsc4py.PETSc cimport GetCommDefault
 * cdef inline MPI_Comm SLEPC_COMM_DEFAULT():             # <<<<<<<<<<<<<<
 *      return GetCommDefault()
 * 
 */

static CYTHON_INLINE MPI_Comm __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT(void) {
  MPI_Comm __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SLEPC_COMM_DEFAULT", 0);

  /* "SLEPc/slepcmpi.pxi":20
 * from petsc4py.PETSc cimport GetCommDefault
 * cdef inline MPI_Comm SLEPC_COMM_DEFAULT():
 *      return GetCommDefault()             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_f_8petsc4py_5PETSc_GetCommDefault();
  goto __pyx_L0;

  /* "SLEPc/slepcmpi.pxi":19
 * 
 * from petsc4py.PETSc cimport GetCommDefault
 * cdef inline MPI_Comm SLEPC_COMM_DEFAULT():             # <<<<<<<<<<<<<<
 *      return GetCommDefault()
 * 
 */

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

/* "SLEPc/slepcsys.pxi":51
 *     int SlepcInitializeCalled
 * 
 * cdef inline PetscMatStructure matstructure(object structure) \             # <<<<<<<<<<<<<<
 *     except <PetscMatStructure>(-1):
 *     if   structure is None:  return MAT_DIFFERENT_NONZERO_PATTERN
 */

static CYTHON_INLINE MatStructure __pyx_f_8slepc4py_5SLEPc_matstructure(PyObject *__pyx_v_structure) {
  MatStructure __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  MatStructure __pyx_t_3;
  __Pyx_RefNannySetupContext("matstructure", 0);

  /* "SLEPc/slepcsys.pxi":53
 * cdef inline PetscMatStructure matstructure(object structure) \
 *     except <PetscMatStructure>(-1):
 *     if   structure is None:  return MAT_DIFFERENT_NONZERO_PATTERN             # <<<<<<<<<<<<<<
 *     elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN
 *     elif structure is True:  return MAT_SAME_NONZERO_PATTERN
 */
  __pyx_t_1 = (__pyx_v_structure == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_r = DIFFERENT_NONZERO_PATTERN;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":54
 *     except <PetscMatStructure>(-1):
 *     if   structure is None:  return MAT_DIFFERENT_NONZERO_PATTERN
 *     elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN             # <<<<<<<<<<<<<<
 *     elif structure is True:  return MAT_SAME_NONZERO_PATTERN
 *     else:                    return structure
 */
  __pyx_t_2 = (__pyx_v_structure == Py_False);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_r = DIFFERENT_NONZERO_PATTERN;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":55
 *     if   structure is None:  return MAT_DIFFERENT_NONZERO_PATTERN
 *     elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN
 *     elif structure is True:  return MAT_SAME_NONZERO_PATTERN             # <<<<<<<<<<<<<<
 *     else:                    return structure
 * 
 */
  __pyx_t_1 = (__pyx_v_structure == Py_True);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_r = SAME_NONZERO_PATTERN;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":56
 *     elif structure is False: return MAT_DIFFERENT_NONZERO_PATTERN
 *     elif structure is True:  return MAT_SAME_NONZERO_PATTERN
 *     else:                    return structure             # <<<<<<<<<<<<<<
 * 
 * cdef inline int PetscINCREF(PetscObject *obj):
 */
  /*else*/ {
    __pyx_t_3 = ((MatStructure)__Pyx_PyInt_As_MatStructure(__pyx_v_structure)); if (unlikely(PyErr_Occurred())) __PYX_ERR(6, 56, __pyx_L1_error)
    __pyx_r = __pyx_t_3;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":51
 *     int SlepcInitializeCalled
 * 
 * cdef inline PetscMatStructure matstructure(object structure) \             # <<<<<<<<<<<<<<
 *     except <PetscMatStructure>(-1):
 *     if   structure is None:  return MAT_DIFFERENT_NONZERO_PATTERN
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.matstructure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = ((MatStructure)-1L);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcsys.pxi":58
 *     else:                    return structure
 * 
 * cdef inline int PetscINCREF(PetscObject *obj):             # <<<<<<<<<<<<<<
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_PetscINCREF(PetscObject *__pyx_v_obj) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("PetscINCREF", 0);

  /* "SLEPc/slepcsys.pxi":59
 * 
 * cdef inline int PetscINCREF(PetscObject *obj):
 *     if obj    == NULL: return 0             # <<<<<<<<<<<<<<
 *     if obj[0] == NULL: return 0
 *     return PetscObjectReference(obj[0])
 */
  __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":60
 * cdef inline int PetscINCREF(PetscObject *obj):
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0             # <<<<<<<<<<<<<<
 *     return PetscObjectReference(obj[0])
 * 
 */
  __pyx_t_1 = (((__pyx_v_obj[0]) == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":61
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0
 *     return PetscObjectReference(obj[0])             # <<<<<<<<<<<<<<
 * 
 * cdef inline int SlepcCLEAR(PetscObject* obj):
 */
  __pyx_r = PetscObjectReference((__pyx_v_obj[0]));
  goto __pyx_L0;

  /* "SLEPc/slepcsys.pxi":58
 *     else:                    return structure
 * 
 * cdef inline int PetscINCREF(PetscObject *obj):             # <<<<<<<<<<<<<<
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0
 */

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

/* "SLEPc/slepcsys.pxi":63
 *     return PetscObjectReference(obj[0])
 * 
 * cdef inline int SlepcCLEAR(PetscObject* obj):             # <<<<<<<<<<<<<<
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(PetscObject *__pyx_v_obj) {
  PetscObject __pyx_v_tmp;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("SlepcCLEAR", 0);

  /* "SLEPc/slepcsys.pxi":64
 * 
 * cdef inline int SlepcCLEAR(PetscObject* obj):
 *     if obj    == NULL: return 0             # <<<<<<<<<<<<<<
 *     if obj[0] == NULL: return 0
 *     cdef PetscObject tmp
 */
  __pyx_t_1 = ((__pyx_v_obj == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":65
 * cdef inline int SlepcCLEAR(PetscObject* obj):
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0             # <<<<<<<<<<<<<<
 *     cdef PetscObject tmp
 *     tmp = obj[0]; obj[0] = NULL
 */
  __pyx_t_1 = (((__pyx_v_obj[0]) == NULL) != 0);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
  }

  /* "SLEPc/slepcsys.pxi":67
 *     if obj[0] == NULL: return 0
 *     cdef PetscObject tmp
 *     tmp = obj[0]; obj[0] = NULL             # <<<<<<<<<<<<<<
 *     return PetscObjectDestroy(&tmp)
 * 
 */
  __pyx_v_tmp = (__pyx_v_obj[0]);
  (__pyx_v_obj[0]) = NULL;

  /* "SLEPc/slepcsys.pxi":68
 *     cdef PetscObject tmp
 *     tmp = obj[0]; obj[0] = NULL
 *     return PetscObjectDestroy(&tmp)             # <<<<<<<<<<<<<<
 * 
 * cdef extern from * nogil:
 */
  __pyx_r = PetscObjectDestroy((&__pyx_v_tmp));
  goto __pyx_L0;

  /* "SLEPc/slepcsys.pxi":63
 *     return PetscObjectReference(obj[0])
 * 
 * cdef inline int SlepcCLEAR(PetscObject* obj):             # <<<<<<<<<<<<<<
 *     if obj    == NULL: return 0
 *     if obj[0] == NULL: return 0
 */

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

/* "SLEPc/slepcbv.pxi":73
 * 
 * 
 * cdef inline int BV_Sizes(             # <<<<<<<<<<<<<<
 *     object size,
 *     PetscInt *_n,
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_BV_Sizes(PyObject *__pyx_v_size, PetscInt *__pyx_v__n, PetscInt *__pyx_v__N) {
  PetscInt __pyx_v_n;
  PetscInt __pyx_v_N;
  PyObject *__pyx_v_on = 0;
  PyObject *__pyx_v_oN = 0;
  int __pyx_r;
  __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)(PyObject *);
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PetscInt __pyx_t_11;
  __Pyx_RefNannySetupContext("BV_Sizes", 0);

  /* "SLEPc/slepcbv.pxi":79
 *     ) except -1:
 *     # unpack and get local and global sizes
 *     cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE             # <<<<<<<<<<<<<<
 *     cdef object on, oN
 *     try:
 */
  __pyx_v_n = PETSC_DECIDE;
  __pyx_v_N = PETSC_DECIDE;

  /* "SLEPc/slepcbv.pxi":81
 *     cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE
 *     cdef object on, oN
 *     try:             # <<<<<<<<<<<<<<
 *         on, oN = size
 *     except (TypeError, ValueError):
 */
  {
    __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:*/ {

      /* "SLEPc/slepcbv.pxi":82
 *     cdef object on, oN
 *     try:
 *         on, oN = size             # <<<<<<<<<<<<<<
 *     except (TypeError, ValueError):
 *         on = None; oN = size
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_size))) || (PyList_CheckExact(__pyx_v_size))) {
        PyObject* sequence = __pyx_v_size;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(2, 82, __pyx_L3_error)
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        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(2, 82, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 82, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_6 = PyObject_GetIter(__pyx_v_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 82, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __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_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(2, 82, __pyx_L3_error)
        __pyx_t_7 = NULL;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(2, 82, __pyx_L3_error)
        __pyx_L12_unpacking_done:;
      }
      __pyx_v_on = __pyx_t_4;
      __pyx_t_4 = 0;
      __pyx_v_oN = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "SLEPc/slepcbv.pxi":81
 *     cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE
 *     cdef object on, oN
 *     try:             # <<<<<<<<<<<<<<
 *         on, oN = size
 *     except (TypeError, ValueError):
 */
    }
    __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_L10_try_end;
    __pyx_L3_error:;
    __Pyx_PyThreadState_assign
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "SLEPc/slepcbv.pxi":83
 *     try:
 *         on, oN = size
 *     except (TypeError, ValueError):             # <<<<<<<<<<<<<<
 *         on = None; oN = size
 *     if on is not None: n = asInt(on)
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_8) {
      __Pyx_AddTraceback("slepc4py.SLEPc.BV_Sizes", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(2, 83, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);

      /* "SLEPc/slepcbv.pxi":84
 *         on, oN = size
 *     except (TypeError, ValueError):
 *         on = None; oN = size             # <<<<<<<<<<<<<<
 *     if on is not None: n = asInt(on)
 *     if oN is not None: N = asInt(oN)
 */
      __Pyx_INCREF(Py_None);
      __Pyx_XDECREF_SET(__pyx_v_on, Py_None);
      __Pyx_INCREF(__pyx_v_size);
      __Pyx_XDECREF_SET(__pyx_v_oN, __pyx_v_size);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "SLEPc/slepcbv.pxi":81
 *     cdef PetscInt n=PETSC_DECIDE, N=PETSC_DECIDE
 *     cdef object on, oN
 *     try:             # <<<<<<<<<<<<<<
 *         on, oN = size
 *     except (TypeError, ValueError):
 */
    __Pyx_PyThreadState_assign
    __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_PyThreadState_assign
    __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_L10_try_end:;
  }

  /* "SLEPc/slepcbv.pxi":85
 *     except (TypeError, ValueError):
 *         on = None; oN = size
 *     if on is not None: n = asInt(on)             # <<<<<<<<<<<<<<
 *     if oN is not None: N = asInt(oN)
 *     if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError(
 */
  __pyx_t_9 = (__pyx_v_on != Py_None);
  __pyx_t_10 = (__pyx_t_9 != 0);
  if (__pyx_t_10) {
    __pyx_t_11 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_on); if (unlikely(__pyx_t_11 == -1L && PyErr_Occurred())) __PYX_ERR(2, 85, __pyx_L1_error)
    __pyx_v_n = __pyx_t_11;
  }

  /* "SLEPc/slepcbv.pxi":86
 *         on = None; oN = size
 *     if on is not None: n = asInt(on)
 *     if oN is not None: N = asInt(oN)             # <<<<<<<<<<<<<<
 *     if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError(
 *         "local and global sizes cannot be both 'DECIDE'")
 */
  __pyx_t_10 = (__pyx_v_oN != Py_None);
  __pyx_t_9 = (__pyx_t_10 != 0);
  if (__pyx_t_9) {
    __pyx_t_11 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_oN); if (unlikely(__pyx_t_11 == -1L && PyErr_Occurred())) __PYX_ERR(2, 86, __pyx_L1_error)
    __pyx_v_N = __pyx_t_11;
  }

  /* "SLEPc/slepcbv.pxi":87
 *     if on is not None: n = asInt(on)
 *     if oN is not None: N = asInt(oN)
 *     if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError(             # <<<<<<<<<<<<<<
 *         "local and global sizes cannot be both 'DECIDE'")
 *     # return result to the caller
 */
  __pyx_t_10 = ((__pyx_v_n == PETSC_DECIDE) != 0);
  if (__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L18_bool_binop_done;
  }
  __pyx_t_10 = ((__pyx_v_N == PETSC_DECIDE) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L18_bool_binop_done:;
  if (__pyx_t_9) {
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 87, __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(2, 87, __pyx_L1_error)
  }

  /* "SLEPc/slepcbv.pxi":90
 *         "local and global sizes cannot be both 'DECIDE'")
 *     # return result to the caller
 *     if _n != NULL: _n[0] = n             # <<<<<<<<<<<<<<
 *     if _N != NULL: _N[0] = N
 *     return 0
 */
  __pyx_t_9 = ((__pyx_v__n != NULL) != 0);
  if (__pyx_t_9) {
    (__pyx_v__n[0]) = __pyx_v_n;
  }

  /* "SLEPc/slepcbv.pxi":91
 *     # return result to the caller
 *     if _n != NULL: _n[0] = n
 *     if _N != NULL: _N[0] = N             # <<<<<<<<<<<<<<
 *     return 0
 */
  __pyx_t_9 = ((__pyx_v__N != NULL) != 0);
  if (__pyx_t_9) {
    (__pyx_v__N[0]) = __pyx_v_N;
  }

  /* "SLEPc/slepcbv.pxi":92
 *     if _n != NULL: _n[0] = n
 *     if _N != NULL: _N[0] = N
 *     return 0             # <<<<<<<<<<<<<<
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "SLEPc/slepcbv.pxi":73
 * 
 * 
 * cdef inline int BV_Sizes(             # <<<<<<<<<<<<<<
 *     object size,
 *     PetscInt *_n,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV_Sizes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_on);
  __Pyx_XDECREF(__pyx_v_oN);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcfn.pxi":47
 *     int FNPhiGetIndex(SlepcFN,PetscInt*)
 * 
 * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0, n = len(array)
 *     cdef PetscScalar *a = NULL
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_iarray_s(PyObject *__pyx_v_array, PetscInt *__pyx_v_size, PetscScalar **__pyx_v_data) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PetscScalar *__pyx_v_a;
  PyObject *__pyx_v_mem = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PetscScalar __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("iarray_s", 0);

  /* "SLEPc/slepcfn.pxi":48
 * 
 * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data):
 *     cdef Py_ssize_t i = 0, n = len(array)             # <<<<<<<<<<<<<<
 *     cdef PetscScalar *a = NULL
 *     cdef object mem = allocate(n*sizeof(PetscScalar),<void**>&a)
 */
  __pyx_v_i = 0;
  __pyx_t_1 = PyObject_Length(__pyx_v_array); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(7, 48, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "SLEPc/slepcfn.pxi":49
 * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data):
 *     cdef Py_ssize_t i = 0, n = len(array)
 *     cdef PetscScalar *a = NULL             # <<<<<<<<<<<<<<
 *     cdef object mem = allocate(n*sizeof(PetscScalar),<void**>&a)
 *     for i from 0 <= i < n: a[i] = asScalar(array[i])
 */
  __pyx_v_a = NULL;

  /* "SLEPc/slepcfn.pxi":50
 *     cdef Py_ssize_t i = 0, n = len(array)
 *     cdef PetscScalar *a = NULL
 *     cdef object mem = allocate(n*sizeof(PetscScalar),<void**>&a)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n: a[i] = asScalar(array[i])
 *     if size != NULL: size[0] = <PetscInt> n
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_n * (sizeof(PetscScalar))), ((void **)(&__pyx_v_a))); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_mem = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "SLEPc/slepcfn.pxi":51
 *     cdef PetscScalar *a = NULL
 *     cdef object mem = allocate(n*sizeof(PetscScalar),<void**>&a)
 *     for i from 0 <= i < n: a[i] = asScalar(array[i])             # <<<<<<<<<<<<<<
 *     if size != NULL: size[0] = <PetscInt> n
 *     if data != NULL: data[0] = a
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_array, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(7, 51, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_a[__pyx_v_i]) = __pyx_t_3;
  }

  /* "SLEPc/slepcfn.pxi":52
 *     cdef object mem = allocate(n*sizeof(PetscScalar),<void**>&a)
 *     for i from 0 <= i < n: a[i] = asScalar(array[i])
 *     if size != NULL: size[0] = <PetscInt> n             # <<<<<<<<<<<<<<
 *     if data != NULL: data[0] = a
 *     return mem
 */
  __pyx_t_4 = ((__pyx_v_size != NULL) != 0);
  if (__pyx_t_4) {
    (__pyx_v_size[0]) = ((PetscInt)__pyx_v_n);
  }

  /* "SLEPc/slepcfn.pxi":53
 *     for i from 0 <= i < n: a[i] = asScalar(array[i])
 *     if size != NULL: size[0] = <PetscInt> n
 *     if data != NULL: data[0] = a             # <<<<<<<<<<<<<<
 *     return mem
 */
  __pyx_t_4 = ((__pyx_v_data != NULL) != 0);
  if (__pyx_t_4) {
    (__pyx_v_data[0]) = __pyx_v_a;
  }

  /* "SLEPc/slepcfn.pxi":54
 *     if size != NULL: size[0] = <PetscInt> n
 *     if data != NULL: data[0] = a
 *     return mem             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_mem);
  __pyx_r = __pyx_v_mem;
  goto __pyx_L0;

  /* "SLEPc/slepcfn.pxi":47
 *     int FNPhiGetIndex(SlepcFN,PetscInt*)
 * 
 * cdef object iarray_s(object array, PetscInt* size, PetscScalar** data):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0, n = len(array)
 *     cdef PetscScalar *a = NULL
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.iarray_s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mem);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcnep.pxi":116
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline Mat ref_Mat(PetscMat mat):             # <<<<<<<<<<<<<<
 *     cdef Mat ob = <Mat> Mat()
 *     ob.mat = mat
 */

static CYTHON_INLINE struct PyPetscMatObject *__pyx_f_8slepc4py_5SLEPc_ref_Mat(Mat __pyx_v_mat) {
  struct PyPetscMatObject *__pyx_v_ob = 0;
  struct PyPetscMatObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("ref_Mat", 0);

  /* "SLEPc/slepcnep.pxi":117
 * 
 * cdef inline Mat ref_Mat(PetscMat mat):
 *     cdef Mat ob = <Mat> Mat()             # <<<<<<<<<<<<<<
 *     ob.mat = mat
 *     PetscINCREF(ob.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ob = ((struct PyPetscMatObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/slepcnep.pxi":118
 * cdef inline Mat ref_Mat(PetscMat mat):
 *     cdef Mat ob = <Mat> Mat()
 *     ob.mat = mat             # <<<<<<<<<<<<<<
 *     PetscINCREF(ob.obj)
 *     return ob
 */
  __pyx_v_ob->mat = __pyx_v_mat;

  /* "SLEPc/slepcnep.pxi":119
 *     cdef Mat ob = <Mat> Mat()
 *     ob.mat = mat
 *     PetscINCREF(ob.obj)             # <<<<<<<<<<<<<<
 *     return ob
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj);

  /* "SLEPc/slepcnep.pxi":120
 *     ob.mat = mat
 *     PetscINCREF(ob.obj)
 *     return ob             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_ob));
  __pyx_r = __pyx_v_ob;
  goto __pyx_L0;

  /* "SLEPc/slepcnep.pxi":116
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline Mat ref_Mat(PetscMat mat):             # <<<<<<<<<<<<<<
 *     cdef Mat ob = <Mat> Mat()
 *     ob.mat = mat
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ref_Mat", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcnep.pxi":124
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline NEP ref_NEP(SlepcNEP nep):             # <<<<<<<<<<<<<<
 *     cdef NEP ob = <NEP> NEP()
 *     ob.nep = nep
 */

static CYTHON_INLINE struct PySlepcNEPObject *__pyx_f_8slepc4py_5SLEPc_ref_NEP(NEP __pyx_v_nep) {
  struct PySlepcNEPObject *__pyx_v_ob = 0;
  struct PySlepcNEPObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("ref_NEP", 0);

  /* "SLEPc/slepcnep.pxi":125
 * 
 * cdef inline NEP ref_NEP(SlepcNEP nep):
 *     cdef NEP ob = <NEP> NEP()             # <<<<<<<<<<<<<<
 *     ob.nep = nep
 *     PetscINCREF(ob.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_ob = ((struct PySlepcNEPObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/slepcnep.pxi":126
 * cdef inline NEP ref_NEP(SlepcNEP nep):
 *     cdef NEP ob = <NEP> NEP()
 *     ob.nep = nep             # <<<<<<<<<<<<<<
 *     PetscINCREF(ob.obj)
 *     return ob
 */
  __pyx_v_ob->nep = __pyx_v_nep;

  /* "SLEPc/slepcnep.pxi":127
 *     cdef NEP ob = <NEP> NEP()
 *     ob.nep = nep
 *     PetscINCREF(ob.obj)             # <<<<<<<<<<<<<<
 *     return ob
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ob->__pyx_base.obj);

  /* "SLEPc/slepcnep.pxi":128
 *     ob.nep = nep
 *     PetscINCREF(ob.obj)
 *     return ob             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_ob));
  __pyx_r = __pyx_v_ob;
  goto __pyx_L0;

  /* "SLEPc/slepcnep.pxi":124
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline NEP ref_NEP(SlepcNEP nep):             # <<<<<<<<<<<<<<
 *     cdef NEP ob = <NEP> NEP()
 *     ob.nep = nep
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ref_NEP", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/slepcnep.pxi":132
 * # -----------------------------------------------------------------------------
 * 
 * cdef int NEP_Function(             # <<<<<<<<<<<<<<
 *     SlepcNEP    nep,
 *     PetscScalar mu,
 */

static int __pyx_f_8slepc4py_5SLEPc_NEP_Function(NEP __pyx_v_nep, PetscScalar __pyx_v_mu, Mat __pyx_v_A, Mat __pyx_v_B, CYTHON_UNUSED void *__pyx_v_ctx) {
  struct PySlepcNEPObject *__pyx_v_Nep = 0;
  struct PyPetscMatObject *__pyx_v_Amat = 0;
  struct PyPetscMatObject *__pyx_v_Bmat = 0;
  PyObject *__pyx_v_function = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_kargs = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_retv = NULL;
  Mat __pyx_v_Atmp;
  Mat __pyx_v_Btmp;
  int __pyx_r;
  __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)(PyObject *);
  Mat __pyx_t_7;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("NEP_Function", 0);

  /* "SLEPc/slepcnep.pxi":139
 *     void*       ctx,
 *     ) except PETSC_ERR_PYTHON with gil:
 *     cdef NEP Nep  = ref_NEP(nep)             # <<<<<<<<<<<<<<
 *     cdef Mat Amat = ref_Mat(A)
 *     cdef Mat Bmat = ref_Mat(B)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_NEP(__pyx_v_nep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/slepcnep.pxi":140
 *     ) except PETSC_ERR_PYTHON with gil:
 *     cdef NEP Nep  = ref_NEP(nep)
 *     cdef Mat Amat = ref_Mat(A)             # <<<<<<<<<<<<<<
 *     cdef Mat Bmat = ref_Mat(B)
 *     (function, args, kargs) = Nep.get_attr('__function__')
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_A)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_Amat = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/slepcnep.pxi":141
 *     cdef NEP Nep  = ref_NEP(nep)
 *     cdef Mat Amat = ref_Mat(A)
 *     cdef Mat Bmat = ref_Mat(B)             # <<<<<<<<<<<<<<
 *     (function, args, kargs) = Nep.get_attr('__function__')
 *     retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_B)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_Bmat = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/slepcnep.pxi":142
 *     cdef Mat Amat = ref_Mat(A)
 *     cdef Mat Bmat = ref_Mat(B)
 *     (function, args, kargs) = Nep.get_attr('__function__')             # <<<<<<<<<<<<<<
 *     retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs)
 *     cdef PetscMat Atmp = NULL, Btmp = NULL
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_Nep->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Nep), ((char *)"__function__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(8, 142, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 142, __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_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(8, 142, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(8, 142, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_function = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_args = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_kargs = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/slepcnep.pxi":143
 *     cdef Mat Bmat = ref_Mat(B)
 *     (function, args, kargs) = Nep.get_attr('__function__')
 *     retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs)             # <<<<<<<<<<<<<<
 *     cdef PetscMat Atmp = NULL, Btmp = NULL
 *     Atmp = A; A = Amat.mat; Amat.mat = Atmp
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_mu); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_Nep));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Nep));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_Nep));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_Amat));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Amat));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_Amat));
  __Pyx_INCREF(((PyObject *)__pyx_v_Bmat));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Bmat));
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_Bmat));
  __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_kargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(8, 143, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_kargs))) {
    __pyx_t_1 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_function, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 143, __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_v_retv = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/slepcnep.pxi":144
 *     (function, args, kargs) = Nep.get_attr('__function__')
 *     retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs)
 *     cdef PetscMat Atmp = NULL, Btmp = NULL             # <<<<<<<<<<<<<<
 *     Atmp = A; A = Amat.mat; Amat.mat = Atmp
 *     Btmp = B; B = Bmat.mat; Bmat.mat = Btmp
 */
  __pyx_v_Atmp = NULL;
  __pyx_v_Btmp = NULL;

  /* "SLEPc/slepcnep.pxi":145
 *     retv = function(Nep, toScalar(mu), Amat, Bmat, *args, **kargs)
 *     cdef PetscMat Atmp = NULL, Btmp = NULL
 *     Atmp = A; A = Amat.mat; Amat.mat = Atmp             # <<<<<<<<<<<<<<
 *     Btmp = B; B = Bmat.mat; Bmat.mat = Btmp
 *     return 0
 */
  __pyx_v_Atmp = __pyx_v_A;
  __pyx_t_7 = __pyx_v_Amat->mat;
  __pyx_v_A = __pyx_t_7;
  __pyx_v_Amat->mat = __pyx_v_Atmp;

  /* "SLEPc/slepcnep.pxi":146
 *     cdef PetscMat Atmp = NULL, Btmp = NULL
 *     Atmp = A; A = Amat.mat; Amat.mat = Atmp
 *     Btmp = B; B = Bmat.mat; Bmat.mat = Btmp             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_v_Btmp = __pyx_v_B;
  __pyx_t_7 = __pyx_v_Bmat->mat;
  __pyx_v_B = __pyx_t_7;
  __pyx_v_Bmat->mat = __pyx_v_Btmp;

  /* "SLEPc/slepcnep.pxi":147
 *     Atmp = A; A = Amat.mat; Amat.mat = Atmp
 *     Btmp = B; B = Bmat.mat; Bmat.mat = Btmp
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "SLEPc/slepcnep.pxi":132
 * # -----------------------------------------------------------------------------
 * 
 * cdef int NEP_Function(             # <<<<<<<<<<<<<<
 *     SlepcNEP    nep,
 *     PetscScalar mu,
 */

  /* 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("slepc4py.SLEPc.NEP_Function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = (-1);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_Nep);
  __Pyx_XDECREF((PyObject *)__pyx_v_Amat);
  __Pyx_XDECREF((PyObject *)__pyx_v_Bmat);
  __Pyx_XDECREF(__pyx_v_function);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XDECREF(__pyx_v_retv);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "SLEPc/slepcnep.pxi":151
 * # -----------------------------------------------------------------------------
 * 
 * cdef int NEP_Jacobian(             # <<<<<<<<<<<<<<
 *     SlepcNEP    nep,
 *     PetscScalar mu,
 */

static int __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian(NEP __pyx_v_nep, PetscScalar __pyx_v_mu, Mat __pyx_v_J, CYTHON_UNUSED void *__pyx_v_ctx) {
  struct PySlepcNEPObject *__pyx_v_Nep = 0;
  struct PyPetscMatObject *__pyx_v_Jmat = 0;
  PyObject *__pyx_v_jacobian = NULL;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_kargs = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_retv = NULL;
  Mat __pyx_v_Jtmp;
  int __pyx_r;
  __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)(PyObject *);
  Mat __pyx_t_7;
  #ifdef WITH_THREAD
  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();
  #endif
  __Pyx_RefNannySetupContext("NEP_Jacobian", 0);

  /* "SLEPc/slepcnep.pxi":157
 *     void*       ctx,
 *     ) except PETSC_ERR_PYTHON with gil:
 *     cdef NEP Nep  = ref_NEP(nep)             # <<<<<<<<<<<<<<
 *     cdef Mat Jmat = ref_Mat(J)
 *     (jacobian, args, kargs) = Nep.get_attr('__jacobian__')
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_NEP(__pyx_v_nep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_Nep = ((struct PySlepcNEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/slepcnep.pxi":158
 *     ) except PETSC_ERR_PYTHON with gil:
 *     cdef NEP Nep  = ref_NEP(nep)
 *     cdef Mat Jmat = ref_Mat(J)             # <<<<<<<<<<<<<<
 *     (jacobian, args, kargs) = Nep.get_attr('__jacobian__')
 *     retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs)
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_8slepc4py_5SLEPc_ref_Mat(__pyx_v_J)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_Jmat = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/slepcnep.pxi":159
 *     cdef NEP Nep  = ref_NEP(nep)
 *     cdef Mat Jmat = ref_Mat(J)
 *     (jacobian, args, kargs) = Nep.get_attr('__jacobian__')             # <<<<<<<<<<<<<<
 *     retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs)
 *     cdef PetscMat Jtmp = NULL
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_Nep->__pyx_base.__pyx_vtab)->__pyx_base.get_attr(((struct PyPetscObjectObject *)__pyx_v_Nep), ((char *)"__jacobian__")); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(8, 159, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 159, __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_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 3) < 0) __PYX_ERR(8, 159, __pyx_L1_error)
    __pyx_t_6 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(8, 159, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_jacobian = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_args = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_kargs = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/slepcnep.pxi":160
 *     cdef Mat Jmat = ref_Mat(J)
 *     (jacobian, args, kargs) = Nep.get_attr('__jacobian__')
 *     retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs)             # <<<<<<<<<<<<<<
 *     cdef PetscMat Jtmp = NULL
 *     Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_mu); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_Nep));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Nep));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_Nep));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_Jmat));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_Jmat));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_Jmat));
  __pyx_t_1 = 0;
  __pyx_t_1 = PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_v_kargs == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(8, 160, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_kargs))) {
    __pyx_t_1 = PyDict_Copy(__pyx_v_kargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_1 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_kargs, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_jacobian, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 160, __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_v_retv = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/slepcnep.pxi":161
 *     (jacobian, args, kargs) = Nep.get_attr('__jacobian__')
 *     retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs)
 *     cdef PetscMat Jtmp = NULL             # <<<<<<<<<<<<<<
 *     Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp
 *     return 0
 */
  __pyx_v_Jtmp = NULL;

  /* "SLEPc/slepcnep.pxi":162
 *     retv = jacobian(Nep, toScalar(mu), Jmat, *args, **kargs)
 *     cdef PetscMat Jtmp = NULL
 *     Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_v_Jtmp = __pyx_v_J;
  __pyx_t_7 = __pyx_v_Jmat->mat;
  __pyx_v_J = __pyx_t_7;
  __pyx_v_Jmat->mat = __pyx_v_Jtmp;

  /* "SLEPc/slepcnep.pxi":163
 *     cdef PetscMat Jtmp = NULL
 *     Jtmp = J; J = Jmat.mat; Jmat.mat = Jtmp
 *     return 0             # <<<<<<<<<<<<<<
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "SLEPc/slepcnep.pxi":151
 * # -----------------------------------------------------------------------------
 * 
 * cdef int NEP_Jacobian(             # <<<<<<<<<<<<<<
 *     SlepcNEP    nep,
 *     PetscScalar mu,
 */

  /* 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("slepc4py.SLEPc.NEP_Jacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = (-1);
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_Nep);
  __Pyx_XDECREF((PyObject *)__pyx_v_Jmat);
  __Pyx_XDECREF(__pyx_v_jacobian);
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XDECREF(__pyx_v_retv);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "SLEPc/Sys.pyx":6
 * 
 *     @classmethod
 *     def getVersion(cls, patch=False, devel=False,             # <<<<<<<<<<<<<<
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3Sys_getVersion[] = "Sys.getVersion(type cls, patch=False, devel=False, date=False, author=False)";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_patch = 0;
  PyObject *__pyx_v_devel = 0;
  PyObject *__pyx_v_date = 0;
  PyObject *__pyx_v_author = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getVersion (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_patch,&__pyx_n_s_devel,&__pyx_n_s_date,&__pyx_n_s_author,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_False);
    values[1] = ((PyObject *)Py_False);

    /* "SLEPc/Sys.pyx":7
 *     @classmethod
 *     def getVersion(cls, patch=False, devel=False,
 *                    date=False, author=False):             # <<<<<<<<<<<<<<
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 */
    values[2] = ((PyObject *)Py_False);
    values[3] = ((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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_patch);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_devel);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_date);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_author);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVersion") < 0)) __PYX_ERR(9, 6, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_patch = values[0];
    __pyx_v_devel = values[1];
    __pyx_v_date = values[2];
    __pyx_v_author = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getVersion", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 6, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(((PyTypeObject*)__pyx_v_cls), __pyx_v_patch, __pyx_v_devel, __pyx_v_date, __pyx_v_author);

  /* "SLEPc/Sys.pyx":6
 * 
 *     @classmethod
 *     def getVersion(cls, patch=False, devel=False,             # <<<<<<<<<<<<<<
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 */

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_getVersion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_patch, PyObject *__pyx_v_devel, PyObject *__pyx_v_date, PyObject *__pyx_v_author) {
  int __pyx_v_cmajor;
  int __pyx_v_cminor;
  int __pyx_v_cmicro;
  int __pyx_v_cpatch;
  int __pyx_v_cdevel;
  const char *__pyx_v_cdate;
  const char *__pyx_v_cauthorinfo;
  PyObject *__pyx_v_version = NULL;
  PyObject *__pyx_v_out = NULL;
  PyObject *__pyx_v_s = 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;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  __Pyx_RefNannySetupContext("getVersion", 0);
  __Pyx_INCREF(__pyx_v_author);

  /* "SLEPc/Sys.pyx":8
 *     def getVersion(cls, patch=False, devel=False,
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR             # <<<<<<<<<<<<<<
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 */
  __pyx_v_cmajor = SLEPC_VERSION_MAJOR;

  /* "SLEPc/Sys.pyx":9
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR             # <<<<<<<<<<<<<<
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 */
  __pyx_v_cminor = SLEPC_VERSION_MINOR;

  /* "SLEPc/Sys.pyx":10
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR             # <<<<<<<<<<<<<<
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int cdevel = not SLEPC_VERSION_RELEASE
 */
  __pyx_v_cmicro = SLEPC_VERSION_SUBMINOR;

  /* "SLEPc/Sys.pyx":11
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH             # <<<<<<<<<<<<<<
 *         cdef int cdevel = not SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 */
  __pyx_v_cpatch = SLEPC_VERSION_PATCH;

  /* "SLEPc/Sys.pyx":12
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int cdevel = not SLEPC_VERSION_RELEASE             # <<<<<<<<<<<<<<
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 */
  __pyx_v_cdevel = (!SLEPC_VERSION_RELEASE);

  /* "SLEPc/Sys.pyx":13
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int cdevel = not SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE             # <<<<<<<<<<<<<<
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         version = (cmajor, cminor, cmicro)
 */
  __pyx_v_cdate = SLEPC_VERSION_DATE;

  /* "SLEPc/Sys.pyx":14
 *         cdef int cdevel = not SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO             # <<<<<<<<<<<<<<
 *         version = (cmajor, cminor, cmicro)
 *         out = version
 */
  __pyx_v_cauthorinfo = SLEPC_AUTHOR_INFO;

  /* "SLEPc/Sys.pyx":15
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         version = (cmajor, cminor, cmicro)             # <<<<<<<<<<<<<<
 *         out = version
 *         if patch or devel or date or author:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_cmajor); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cminor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_cmicro); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_v_version = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/Sys.pyx":16
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         version = (cmajor, cminor, cmicro)
 *         out = version             # <<<<<<<<<<<<<<
 *         if patch or devel or date or author:
 *             out = [version]
 */
  __Pyx_INCREF(__pyx_v_version);
  __pyx_v_out = __pyx_v_version;

  /* "SLEPc/Sys.pyx":17
 *         version = (cmajor, cminor, cmicro)
 *         out = version
 *         if patch or devel or date or author:             # <<<<<<<<<<<<<<
 *             out = [version]
 *             if patch:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_patch); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 17, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "SLEPc/Sys.pyx":18
 *         out = version
 *         if patch or devel or date or author:
 *             out = [version]             # <<<<<<<<<<<<<<
 *             if patch:
 *                 out.append(cpatch)
 */
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_version);
    __Pyx_GIVEREF(__pyx_v_version);
    PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_version);
    __Pyx_DECREF_SET(__pyx_v_out, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "SLEPc/Sys.pyx":19
 *         if patch or devel or date or author:
 *             out = [version]
 *             if patch:             # <<<<<<<<<<<<<<
 *                 out.append(cpatch)
 *             if devel:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_patch); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 19, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "SLEPc/Sys.pyx":20
 *             out = [version]
 *             if patch:
 *                 out.append(cpatch)             # <<<<<<<<<<<<<<
 *             if devel:
 *                 out.append(<bint>cdevel)
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_cpatch); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 20, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "SLEPc/Sys.pyx":19
 *         if patch or devel or date or author:
 *             out = [version]
 *             if patch:             # <<<<<<<<<<<<<<
 *                 out.append(cpatch)
 *             if devel:
 */
    }

    /* "SLEPc/Sys.pyx":21
 *             if patch:
 *                 out.append(cpatch)
 *             if devel:             # <<<<<<<<<<<<<<
 *                 out.append(<bint>cdevel)
 *             if date:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_devel); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 21, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "SLEPc/Sys.pyx":22
 *                 out.append(cpatch)
 *             if devel:
 *                 out.append(<bint>cdevel)             # <<<<<<<<<<<<<<
 *             if date:
 *                 out.append(bytes2str(cdate))
 */
      __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_cdevel != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 22, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "SLEPc/Sys.pyx":21
 *             if patch:
 *                 out.append(cpatch)
 *             if devel:             # <<<<<<<<<<<<<<
 *                 out.append(<bint>cdevel)
 *             if date:
 */
    }

    /* "SLEPc/Sys.pyx":23
 *             if devel:
 *                 out.append(<bint>cdevel)
 *             if date:             # <<<<<<<<<<<<<<
 *                 out.append(bytes2str(cdate))
 *             if author:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_date); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 23, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "SLEPc/Sys.pyx":24
 *                 out.append(<bint>cdevel)
 *             if date:
 *                 out.append(bytes2str(cdate))             # <<<<<<<<<<<<<<
 *             if author:
 *                 author = bytes2str(cauthorinfo).split('\n')
 */
      __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cdate); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 24, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 24, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "SLEPc/Sys.pyx":23
 *             if devel:
 *                 out.append(<bint>cdevel)
 *             if date:             # <<<<<<<<<<<<<<
 *                 out.append(bytes2str(cdate))
 *             if author:
 */
    }

    /* "SLEPc/Sys.pyx":25
 *             if date:
 *                 out.append(bytes2str(cdate))
 *             if author:             # <<<<<<<<<<<<<<
 *                 author = bytes2str(cauthorinfo).split('\n')
 *                 author = [s.strip() for s in author if s]
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_author); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 25, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "SLEPc/Sys.pyx":26
 *                 out.append(bytes2str(cdate))
 *             if author:
 *                 author = bytes2str(cauthorinfo).split('\n')             # <<<<<<<<<<<<<<
 *                 author = [s.strip() for s in author if s]
 *                 out.append(author)
 */
      __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cauthorinfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 26, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "SLEPc/Sys.pyx":27
 *             if author:
 *                 author = bytes2str(cauthorinfo).split('\n')
 *                 author = [s.strip() for s in author if s]             # <<<<<<<<<<<<<<
 *                 out.append(author)
 *         return tuple(out)
 */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (likely(PyList_CheckExact(__pyx_v_author)) || PyTuple_CheckExact(__pyx_v_author)) {
        __pyx_t_3 = __pyx_v_author; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_author); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 27, __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(9, 27, __pyx_L1_error)
      }
      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_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 27, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          } else {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(9, 27, __pyx_L1_error)
            #else
            __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_9(__pyx_t_3);
          if (unlikely(!__pyx_t_2)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(9, 27, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_s); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(9, 27, __pyx_L1_error)
        if (__pyx_t_5) {
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 27, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_10 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          if (__pyx_t_10) {
            __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          } else {
            __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __pyx_L1_error)
          }
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(9, 27, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "SLEPc/Sys.pyx":28
 *                 author = bytes2str(cauthorinfo).split('\n')
 *                 author = [s.strip() for s in author if s]
 *                 out.append(author)             # <<<<<<<<<<<<<<
 *         return tuple(out)
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_out, __pyx_v_author); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(9, 28, __pyx_L1_error)

      /* "SLEPc/Sys.pyx":25
 *             if date:
 *                 out.append(bytes2str(cdate))
 *             if author:             # <<<<<<<<<<<<<<
 *                 author = bytes2str(cauthorinfo).split('\n')
 *                 author = [s.strip() for s in author if s]
 */
    }

    /* "SLEPc/Sys.pyx":17
 *         version = (cmajor, cminor, cmicro)
 *         out = version
 *         if patch or devel or date or author:             # <<<<<<<<<<<<<<
 *             out = [version]
 *             if patch:
 */
  }

  /* "SLEPc/Sys.pyx":29
 *                 author = [s.strip() for s in author if s]
 *                 out.append(author)
 *         return tuple(out)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PySequence_Tuple(__pyx_v_out); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/Sys.pyx":6
 * 
 *     @classmethod
 *     def getVersion(cls, patch=False, devel=False,             # <<<<<<<<<<<<<<
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 */

  /* 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_10);
  __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_version);
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_author);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/Sys.pyx":32
 * 
 *     @classmethod
 *     def getVersionInfo(cls):             # <<<<<<<<<<<<<<
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3Sys_2getVersionInfo[] = "Sys.getVersionInfo(type cls)";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getVersionInfo (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getVersionInfo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getVersionInfo", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(((PyTypeObject*)__pyx_v_cls));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3Sys_2getVersionInfo(CYTHON_UNUSED PyTypeObject *__pyx_v_cls) {
  int __pyx_v_cmajor;
  int __pyx_v_cminor;
  int __pyx_v_cmicro;
  int __pyx_v_cpatch;
  int __pyx_v_crelease;
  const char *__pyx_v_cdate;
  const char *__pyx_v_cauthorinfo;
  PyObject *__pyx_v_author = NULL;
  PyObject *__pyx_v_s = 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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getVersionInfo", 0);

  /* "SLEPc/Sys.pyx":33
 *     @classmethod
 *     def getVersionInfo(cls):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR             # <<<<<<<<<<<<<<
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 */
  __pyx_v_cmajor = SLEPC_VERSION_MAJOR;

  /* "SLEPc/Sys.pyx":34
 *     def getVersionInfo(cls):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR             # <<<<<<<<<<<<<<
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 */
  __pyx_v_cminor = SLEPC_VERSION_MINOR;

  /* "SLEPc/Sys.pyx":35
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR             # <<<<<<<<<<<<<<
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int crelease = SLEPC_VERSION_RELEASE
 */
  __pyx_v_cmicro = SLEPC_VERSION_SUBMINOR;

  /* "SLEPc/Sys.pyx":36
 *         cdef int cminor = SLEPC_VERSION_MINOR
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH             # <<<<<<<<<<<<<<
 *         cdef int crelease = SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 */
  __pyx_v_cpatch = SLEPC_VERSION_PATCH;

  /* "SLEPc/Sys.pyx":37
 *         cdef int cmicro = SLEPC_VERSION_SUBMINOR
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int crelease = SLEPC_VERSION_RELEASE             # <<<<<<<<<<<<<<
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 */
  __pyx_v_crelease = SLEPC_VERSION_RELEASE;

  /* "SLEPc/Sys.pyx":38
 *         cdef int cpatch = SLEPC_VERSION_PATCH
 *         cdef int crelease = SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE             # <<<<<<<<<<<<<<
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         author = bytes2str(cauthorinfo).split('\n')
 */
  __pyx_v_cdate = SLEPC_VERSION_DATE;

  /* "SLEPc/Sys.pyx":39
 *         cdef int crelease = SLEPC_VERSION_RELEASE
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO             # <<<<<<<<<<<<<<
 *         author = bytes2str(cauthorinfo).split('\n')
 *         author = [s.strip() for s in author if s]
 */
  __pyx_v_cauthorinfo = SLEPC_AUTHOR_INFO;

  /* "SLEPc/Sys.pyx":40
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         author = bytes2str(cauthorinfo).split('\n')             # <<<<<<<<<<<<<<
 *         author = [s.strip() for s in author if s]
 *         return dict(major      = cmajor,
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cauthorinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 40, __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__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_author = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/Sys.pyx":41
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         author = bytes2str(cauthorinfo).split('\n')
 *         author = [s.strip() for s in author if s]             # <<<<<<<<<<<<<<
 *         return dict(major      = cmajor,
 *                     minor      = cminor,
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_v_author)) || PyTuple_CheckExact(__pyx_v_author)) {
    __pyx_t_2 = __pyx_v_author; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_author); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 41, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 41, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(9, 41, __pyx_L1_error)
        #else
        __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_5)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(9, 41, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_s); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(9, 41, __pyx_L1_error)
    if (__pyx_t_6) {
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) __PYX_ERR(9, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && 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_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 41, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(9, 41, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_author, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/Sys.pyx":42
 *         author = bytes2str(cauthorinfo).split('\n')
 *         author = [s.strip() for s in author if s]
 *         return dict(major      = cmajor,             # <<<<<<<<<<<<<<
 *                     minor      = cminor,
 *                     subminor   = cmicro,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cmajor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_major, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":43
 *         author = [s.strip() for s in author if s]
 *         return dict(major      = cmajor,
 *                     minor      = cminor,             # <<<<<<<<<<<<<<
 *                     subminor   = cmicro,
 *                     patch      = cpatch,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cminor); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_minor, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":44
 *         return dict(major      = cmajor,
 *                     minor      = cminor,
 *                     subminor   = cmicro,             # <<<<<<<<<<<<<<
 *                     patch      = cpatch,
 *                     release    = <bint>crelease,
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cmicro); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_subminor, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":45
 *                     minor      = cminor,
 *                     subminor   = cmicro,
 *                     patch      = cpatch,             # <<<<<<<<<<<<<<
 *                     release    = <bint>crelease,
 *                     date       = bytes2str(cdate),
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cpatch); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_patch, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":46
 *                     subminor   = cmicro,
 *                     patch      = cpatch,
 *                     release    = <bint>crelease,             # <<<<<<<<<<<<<<
 *                     date       = bytes2str(cdate),
 *                     authorinfo = author)
 */
  __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_crelease != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_release, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":47
 *                     patch      = cpatch,
 *                     release    = <bint>crelease,
 *                     date       = bytes2str(cdate),             # <<<<<<<<<<<<<<
 *                     authorinfo = author)
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_cdate); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_date, __pyx_t_2) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":48
 *                     release    = <bint>crelease,
 *                     date       = bytes2str(cdate),
 *                     authorinfo = author)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_authorinfo, __pyx_v_author) < 0) __PYX_ERR(9, 42, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/Sys.pyx":32
 * 
 *     @classmethod
 *     def getVersionInfo(cls):             # <<<<<<<<<<<<<<
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 */

  /* 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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("slepc4py.SLEPc.Sys.getVersionInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_author);
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":43
 *     MatMode      = STMatMode
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.st
 *         self.st = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(((struct PySlepcSTObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_2ST___cinit__(struct PySlepcSTObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/ST.pyx":44
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.st             # <<<<<<<<<<<<<<
 *         self.st = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->st));

  /* "SLEPc/ST.pyx":45
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.st
 *         self.st = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->st = NULL;

  /* "SLEPc/ST.pyx":43
 *     MatMode      = STMatMode
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.st
 *         self.st = NULL
 */

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

/* "SLEPc/ST.pyx":47
 *         self.st = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the ST data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_2view[] = "ST.view(self, Viewer viewer=None)\n\n        Prints the ST data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(0, 47, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 47, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(0, 47, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_2view(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_2view(struct PySlepcSTObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/ST.pyx":57
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( STView(self.st, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/ST.pyx":58
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( STView(self.st, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/ST.pyx":59
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( STView(self.st, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STView(__pyx_v_self->st, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 59, __pyx_L1_error)

  /* "SLEPc/ST.pyx":47
 *         self.st = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the ST data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":61
 *         CHKERR( STView(self.st, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the ST object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_4destroy[] = "ST.destroy(self)\n\n        Destroys the ST object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_4destroy(struct PySlepcSTObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/ST.pyx":65
 *         Destroys the ST object.
 *         """
 *         CHKERR( STDestroy(&self.st) )             # <<<<<<<<<<<<<<
 *         self.st = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STDestroy((&__pyx_v_self->st))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 65, __pyx_L1_error)

  /* "SLEPc/ST.pyx":66
 *         """
 *         CHKERR( STDestroy(&self.st) )
 *         self.st = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->st = NULL;

  /* "SLEPc/ST.pyx":67
 *         CHKERR( STDestroy(&self.st) )
 *         self.st = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":61
 *         CHKERR( STView(self.st, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the ST object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":69
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the ST object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_6reset[] = "ST.reset(self)\n\n        Resets the ST object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_6reset(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_6reset(struct PySlepcSTObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/ST.pyx":73
 *         Resets the ST object.
 *         """
 *         CHKERR( STReset(self.st) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STReset(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 73, __pyx_L1_error)

  /* "SLEPc/ST.pyx":69
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the ST object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":75
 *         CHKERR( STReset(self.st) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the ST object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_8create[] = "ST.create(self, comm=None)\n\n        Creates the ST object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(0, 75, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 75, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8create(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8create(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  ST __pyx_v_newst;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/ST.pyx":85
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcST newst = NULL
 *         CHKERR( STCreate(ccomm, &newst) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/ST.pyx":86
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcST newst = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( STCreate(ccomm, &newst) )
 *         SlepcCLEAR(self.obj); self.st = newst
 */
  __pyx_v_newst = NULL;

  /* "SLEPc/ST.pyx":87
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcST newst = NULL
 *         CHKERR( STCreate(ccomm, &newst) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.st = newst
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STCreate(__pyx_v_ccomm, (&__pyx_v_newst))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 87, __pyx_L1_error)

  /* "SLEPc/ST.pyx":88
 *         cdef SlepcST newst = NULL
 *         CHKERR( STCreate(ccomm, &newst) )
 *         SlepcCLEAR(self.obj); self.st = newst             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->st = __pyx_v_newst;

  /* "SLEPc/ST.pyx":89
 *         CHKERR( STCreate(ccomm, &newst) )
 *         SlepcCLEAR(self.obj); self.st = newst
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, st_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":75
 *         CHKERR( STReset(self.st) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the ST object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":91
 *         return self
 * 
 *     def setType(self, st_type):             # <<<<<<<<<<<<<<
 *         """
 *         Builds ST for a particular spectral transformation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_10setType[] = "ST.setType(self, st_type)\n\n        Builds ST for a particular spectral transformation.\n\n        Parameters\n        ----------\n        st_type: `ST.Type` enumerate\n                 The spectral transformation to be used.\n\n        Notes\n        -----\n        See `ST.Type` for available methods. The default is\n        `ST.Type.SHIFT` with a zero shift.  Normally, it is best to\n        use `setFromOptions()` and then set the ST type from the\n        options database rather than by using this routine.  Using the\n        options database provides the user with maximum flexibility in\n        evaluating the different available methods.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_st_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(0, 91, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_st_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 91, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_10setType(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_st_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_10setType(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_st_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_st_type);

  /* "SLEPc/ST.pyx":109
 *         evaluating the different available methods.
 *         """
 *         cdef SlepcSTType cval = NULL             # <<<<<<<<<<<<<<
 *         st_type = str2bytes(st_type, &cval)
 *         CHKERR( STSetType(self.st, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/ST.pyx":110
 *         """
 *         cdef SlepcSTType cval = NULL
 *         st_type = str2bytes(st_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( STSetType(self.st, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_st_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_st_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/ST.pyx":111
 *         cdef SlepcSTType cval = NULL
 *         st_type = str2bytes(st_type, &cval)
 *         CHKERR( STSetType(self.st, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetType(__pyx_v_self->st, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 111, __pyx_L1_error)

  /* "SLEPc/ST.pyx":91
 *         return self
 * 
 *     def setType(self, st_type):             # <<<<<<<<<<<<<<
 *         """
 *         Builds ST for a particular spectral transformation.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_st_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":113
 *         CHKERR( STSetType(self.st, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the ST type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_12getType[] = "ST.getType(self)\n\n        Gets the ST type of this object.\n\n        Returns\n        -------\n        type: `ST.Type` enumerate\n              The spectral transformation currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_12getType(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_12getType(struct PySlepcSTObject *__pyx_v_self) {
  const char* __pyx_v_st_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/ST.pyx":122
 *               The spectral transformation currently being used.
 *         """
 *         cdef SlepcSTType st_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( STGetType(self.st, &st_type) )
 *         return bytes2str(st_type)
 */
  __pyx_v_st_type = NULL;

  /* "SLEPc/ST.pyx":123
 *         """
 *         cdef SlepcSTType st_type = NULL
 *         CHKERR( STGetType(self.st, &st_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(st_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetType(__pyx_v_self->st, (&__pyx_v_st_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 123, __pyx_L1_error)

  /* "SLEPc/ST.pyx":124
 *         cdef SlepcSTType st_type = NULL
 *         CHKERR( STGetType(self.st, &st_type) )
 *         return bytes2str(st_type)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_st_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":113
 *         CHKERR( STSetType(self.st, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the ST type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":126
 *         return bytes2str(st_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all ST options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_14setOptionsPrefix[] = "ST.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all ST options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all ST option\n                requests.\n\n        Notes\n        -----\n        A hyphen (``-``) must NOT be given at the beginning of the\n        prefix name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(0, 126, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 126, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_14setOptionsPrefix(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/ST.pyx":143
 *         AUTOMATICALLY the hyphen.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( STSetOptionsPrefix(self.st, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/ST.pyx":144
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( STSetOptionsPrefix(self.st, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/ST.pyx":145
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( STSetOptionsPrefix(self.st, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetOptionsPrefix(__pyx_v_self->st, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 145, __pyx_L1_error)

  /* "SLEPc/ST.pyx":126
 *         return bytes2str(st_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all ST options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":147
 *         CHKERR( STSetOptionsPrefix(self.st, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all ST options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_16getOptionsPrefix[] = "ST.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all ST options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this ST object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_16getOptionsPrefix(struct PySlepcSTObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/ST.pyx":157
 *                 The prefix string set for this ST object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( STGetOptionsPrefix(self.st, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/ST.pyx":158
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( STGetOptionsPrefix(self.st, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetOptionsPrefix(__pyx_v_self->st, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 158, __pyx_L1_error)

  /* "SLEPc/ST.pyx":159
 *         cdef const_char *prefix = NULL
 *         CHKERR( STGetOptionsPrefix(self.st, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":147
 *         CHKERR( STSetOptionsPrefix(self.st, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all ST options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":161
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets ST options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_18setFromOptions[] = "ST.setFromOptions(self)\n\n        Sets ST options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n\n        Notes\n        -----\n        To see all options, run your program with the -help option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_18setFromOptions(struct PySlepcSTObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/ST.pyx":171
 *         To see all options, run your program with the -help option.
 *         """
 *         CHKERR( STSetFromOptions(self.st) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetFromOptions(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 171, __pyx_L1_error)

  /* "SLEPc/ST.pyx":161
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets ST options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":175
 *     #
 * 
 *     def setShift(self, shift):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the shift associated with the spectral transformation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_20setShift[] = "ST.setShift(self, shift)\n\n        Sets the shift associated with the spectral transformation.\n\n        Parameters\n        ----------\n        shift: scalar (possibly complex)\n               The value of the shift.\n\n        Notes\n        -----\n        In some spectral transformations, changing the shift may have\n        associated a lot of work, for example recomputing a\n        factorization.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shift = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setShift (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shift,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shift)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setShift") < 0)) __PYX_ERR(0, 175, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_shift = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setShift", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 175, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setShift", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_shift);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_20setShift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_shift) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setShift", 0);

  /* "SLEPc/ST.pyx":190
 *         factorization.
 *         """
 *         cdef PetscScalar sval = asScalar(shift)             # <<<<<<<<<<<<<<
 *         CHKERR( STSetShift(self.st, sval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_shift); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/ST.pyx":191
 *         """
 *         cdef PetscScalar sval = asScalar(shift)
 *         CHKERR( STSetShift(self.st, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def getShift(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetShift(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 191, __pyx_L1_error)

  /* "SLEPc/ST.pyx":175
 *     #
 * 
 *     def setShift(self, shift):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the shift associated with the spectral transformation.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setShift", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":193
 *         CHKERR( STSetShift(self.st, sval) )
 * 
 *     def getShift(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the shift associated with the spectral transformation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_22getShift[] = "ST.getShift(self)\n\n        Gets the shift associated with the spectral transformation.\n\n        Returns\n        -------\n        shift: scalar (possibly complex)\n               The value of the shift.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getShift (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getShift", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getShift", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_22getShift(struct PySlepcSTObject *__pyx_v_self) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getShift", 0);

  /* "SLEPc/ST.pyx":202
 *                The value of the shift.
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( STGetShift(self.st, &sval) )
 *         return toScalar(sval)
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/ST.pyx":203
 *         """
 *         cdef PetscScalar sval = 0
 *         CHKERR( STGetShift(self.st, &sval) )             # <<<<<<<<<<<<<<
 *         return toScalar(sval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetShift(__pyx_v_self->st, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 203, __pyx_L1_error)

  /* "SLEPc/ST.pyx":204
 *         cdef PetscScalar sval = 0
 *         CHKERR( STGetShift(self.st, &sval) )
 *         return toScalar(sval)             # <<<<<<<<<<<<<<
 * 
 *     def setTransform(self, flag):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":193
 *         CHKERR( STSetShift(self.st, sval) )
 * 
 *     def getShift(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the shift associated with the spectral transformation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getShift", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":206
 *         return toScalar(sval)
 * 
 *     def setTransform(self, flag):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate whether the transformed matrices
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_24setTransform[] = "ST.setTransform(self, flag)\n\n        Sets a flag to indicate whether the transformed matrices\n        are computed or not.\n\n        Parameters\n        ----------\n        flag: boolean\n              This flag is intended for the case of polynomial\n              eigenproblems solved via linearization.\n              If this flag is False (default) the spectral transformation\n              is applied to the linearization (handled by the eigensolver),\n              otherwise it is applied to the original problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTransform (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTransform") < 0)) __PYX_ERR(0, 206, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_flag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTransform", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 206, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_flag);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_24setTransform(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  PetscBool __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTransform", 0);

  /* "SLEPc/ST.pyx":220
 *               otherwise it is applied to the original problem.
 *         """
 *         cdef PetscBool sval = flag             # <<<<<<<<<<<<<<
 *         CHKERR( STSetTransform(self.st, sval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/ST.pyx":221
 *         """
 *         cdef PetscBool sval = flag
 *         CHKERR( STSetTransform(self.st, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def getTransform(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetTransform(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 221, __pyx_L1_error)

  /* "SLEPc/ST.pyx":206
 *         return toScalar(sval)
 * 
 *     def setTransform(self, flag):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate whether the transformed matrices
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":223
 *         CHKERR( STSetTransform(self.st, sval) )
 * 
 *     def getTransform(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the flag indicating whether the transformed matrices
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_26getTransform[] = "ST.getTransform(self)\n\n        Gets the flag indicating whether the transformed matrices\n        are computed or not.\n\n        Returns\n        -------\n        flag: boolean\n               This flag is intended for the case of polynomial\n               eigenproblems solved via linearization.\n               If this flag is False (default) the spectral transformation\n               is applied to the linearization (handled by the eigensolver),\n               otherwise it is applied to the original problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTransform (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTransform", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTransform", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_26getTransform(struct PySlepcSTObject *__pyx_v_self) {
  PetscBool __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTransform", 0);

  /* "SLEPc/ST.pyx":237
 *                otherwise it is applied to the original problem.
 *         """
 *         cdef PetscBool sval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( STGetTransform(self.st, &sval) )
 *         return sval
 */
  __pyx_v_sval = PETSC_FALSE;

  /* "SLEPc/ST.pyx":238
 *         """
 *         cdef PetscBool sval = PETSC_FALSE
 *         CHKERR( STGetTransform(self.st, &sval) )             # <<<<<<<<<<<<<<
 *         return sval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetTransform(__pyx_v_self->st, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 238, __pyx_L1_error)

  /* "SLEPc/ST.pyx":239
 *         cdef PetscBool sval = PETSC_FALSE
 *         CHKERR( STGetTransform(self.st, &sval) )
 *         return sval             # <<<<<<<<<<<<<<
 * 
 *     def setMatMode(self, mode):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":223
 *         CHKERR( STSetTransform(self.st, sval) )
 * 
 *     def getTransform(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the flag indicating whether the transformed matrices
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getTransform", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":241
 *         return sval
 * 
 *     def setMatMode(self, mode):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate how the matrix is being shifted in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_28setMatMode[] = "ST.setMatMode(self, mode)\n\n        Sets a flag to indicate how the matrix is being shifted in the\n        shift-and-invert and Cayley spectral transformations.\n\n        Parameters\n        ----------\n        mode: `ST.MatMode` enumerate\n              The mode flag.\n\n        Notes\n        -----\n        By default (`ST.MatMode.COPY`), a copy of matrix ``A`` is made\n        and then this copy is shifted explicitly, e.g. ``A <- (A - s\n        B)``.\n\n        With `ST.MatMode.INPLACE`, the original matrix ``A`` is\n        shifted at `setUp()` and unshifted at the end of the\n        computations. With respect to the previous one, this mode\n        avoids a copy of matrix ``A``. However, a backdraw is that the\n        recovered matrix might be slightly different from the original\n        one (due to roundoff).\n\n        With `ST.MatMode.SHELL`, the solver works with an implicit\n        shell matrix that represents the shifted matrix. This mode is\n        the most efficient in creating the shifted matrix but it\n        places serious limitations to the linear solves performed in\n        each iteration of the eigensolver (typically, only interative\n        solvers with Jacobi preconditioning can be used).\n\n        In the case of generalized problems, in the two first modes\n        the matrix ``A - s B`` has to be computed explicitly. The\n        efficiency of this computation can be controlled with\n        `setMatStructure()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMatMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mode,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatMode") < 0)) __PYX_ERR(0, 241, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_mode = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMatMode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 241, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_mode);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_28setMatMode(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_mode) {
  STMatMode __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  STMatMode __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setMatMode", 0);

  /* "SLEPc/ST.pyx":276
 *         `setMatStructure()`.
 *         """
 *         cdef SlepcSTMatMode val = mode             # <<<<<<<<<<<<<<
 *         CHKERR( STSetMatMode(self.st, val) )
 * 
 */
  __pyx_t_1 = ((STMatMode)__Pyx_PyInt_As_STMatMode(__pyx_v_mode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/ST.pyx":277
 *         """
 *         cdef SlepcSTMatMode val = mode
 *         CHKERR( STSetMatMode(self.st, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getMatMode(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatMode(__pyx_v_self->st, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 277, __pyx_L1_error)

  /* "SLEPc/ST.pyx":241
 *         return sval
 * 
 *     def setMatMode(self, mode):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate how the matrix is being shifted in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":279
 *         CHKERR( STSetMatMode(self.st, val) )
 * 
 *     def getMatMode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets a flag that indicates how the matrix is being shifted in
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_30getMatMode[] = "ST.getMatMode(self)\n\n        Gets a flag that indicates how the matrix is being shifted in\n        the shift-and-invert and Cayley spectral transformations.\n\n        Returns\n        -------\n        mode: `ST.MatMode` enumerate\n              The mode flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMatMode (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getMatMode", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMatMode", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_30getMatMode(struct PySlepcSTObject *__pyx_v_self) {
  STMatMode __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getMatMode", 0);

  /* "SLEPc/ST.pyx":289
 *               The mode flag.
 *         """
 *         cdef SlepcSTMatMode val = ST_MATMODE_INPLACE             # <<<<<<<<<<<<<<
 *         CHKERR( STGetMatMode(self.st, &val) )
 *         return val
 */
  __pyx_v_val = ST_MATMODE_INPLACE;

  /* "SLEPc/ST.pyx":290
 *         """
 *         cdef SlepcSTMatMode val = ST_MATMODE_INPLACE
 *         CHKERR( STGetMatMode(self.st, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetMatMode(__pyx_v_self->st, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 290, __pyx_L1_error)

  /* "SLEPc/ST.pyx":291
 *         cdef SlepcSTMatMode val = ST_MATMODE_INPLACE
 *         CHKERR( STGetMatMode(self.st, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setOperators(self, operators):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_STMatMode(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":279
 *         CHKERR( STSetMatMode(self.st, val) )
 * 
 *     def getMatMode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets a flag that indicates how the matrix is being shifted in
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getMatMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":293
 *         return val
 * 
 *     def setOperators(self, operators):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_32setOperators[] = "ST.setOperators(self, operators)\n\n        Sets the matrices associated with the eigenvalue problem.\n\n        Parameters\n        ----------\n        operators: sequence of Mat\n           The matrices associated with the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_operators = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOperators (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_operators,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operators)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(0, 293, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_operators = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOperators", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 293, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_operators);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_32setOperators(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_operators) {
  Mat *__pyx_v_mats;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Mat __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setOperators", 0);
  __Pyx_INCREF(__pyx_v_operators);

  /* "SLEPc/ST.pyx":302
 *            The matrices associated with the eigensystem.
 *         """
 *         operators = tuple(operators)             # <<<<<<<<<<<<<<
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)
 */
  __pyx_t_1 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/ST.pyx":303
 *         """
 *         operators = tuple(operators)
 *         cdef PetscMat *mats = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 */
  __pyx_v_mats = NULL;

  /* "SLEPc/ST.pyx":304
 *         operators = tuple(operators)
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 */
  __pyx_v_k = 0;
  __pyx_t_2 = PyObject_Length(__pyx_v_operators); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __pyx_v_n = __pyx_t_2;

  /* "SLEPc/ST.pyx":305
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 *         CHKERR( STSetOperators(self.st, <PetscInt>n, mats) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(Mat))), ((void **)(&__pyx_v_mats))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/ST.pyx":306
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat             # <<<<<<<<<<<<<<
 *         CHKERR( STSetOperators(self.st, <PetscInt>n, mats) )
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_2; __pyx_v_k++) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_operators, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(0, 306, __pyx_L1_error)
    __pyx_t_3 = ((struct PyPetscMatObject *)__pyx_t_1)->mat;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_mats[__pyx_v_k]) = __pyx_t_3;
  }

  /* "SLEPc/ST.pyx":307
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 *         CHKERR( STSetOperators(self.st, <PetscInt>n, mats) )             # <<<<<<<<<<<<<<
 * 
 *     def getOperators(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetOperators(__pyx_v_self->st, ((PetscInt)__pyx_v_n), __pyx_v_mats)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 307, __pyx_L1_error)

  /* "SLEPc/ST.pyx":293
 *         return val
 * 
 *     def setOperators(self, operators):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_operators);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":309
 *         CHKERR( STSetOperators(self.st, <PetscInt>n, mats) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_34getOperators[] = "ST.getOperators(self)\n\n        Gets the matrices associated with the eigenvalue problem.\n\n        Returns\n        -------\n        operators: tuple of Mat\n           The matrices associated with the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOperators (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_34getOperators(struct PySlepcSTObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  Mat __pyx_v_mat;
  PetscInt __pyx_v_k;
  PetscInt __pyx_v_n;
  PyObject *__pyx_v_operators = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("getOperators", 0);

  /* "SLEPc/ST.pyx":319
 *         """
 *         cdef Mat A
 *         cdef PetscMat mat = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscInt k=0, n=0
 *         CHKERR( STGetNumMatrices(self.st, &n) )
 */
  __pyx_v_mat = NULL;

  /* "SLEPc/ST.pyx":320
 *         cdef Mat A
 *         cdef PetscMat mat = NULL
 *         cdef PetscInt k=0, n=0             # <<<<<<<<<<<<<<
 *         CHKERR( STGetNumMatrices(self.st, &n) )
 *         cdef object operators = []
 */
  __pyx_v_k = 0;
  __pyx_v_n = 0;

  /* "SLEPc/ST.pyx":321
 *         cdef PetscMat mat = NULL
 *         cdef PetscInt k=0, n=0
 *         CHKERR( STGetNumMatrices(self.st, &n) )             # <<<<<<<<<<<<<<
 *         cdef object operators = []
 *         for k from 0 <= k < n:
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetNumMatrices(__pyx_v_self->st, (&__pyx_v_n))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 321, __pyx_L1_error)

  /* "SLEPc/ST.pyx":322
 *         cdef PetscInt k=0, n=0
 *         CHKERR( STGetNumMatrices(self.st, &n) )
 *         cdef object operators = []             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < n:
 *             CHKERR( STGetOperators(self.st, k, &mat) )
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_operators = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "SLEPc/ST.pyx":323
 *         CHKERR( STGetNumMatrices(self.st, &n) )
 *         cdef object operators = []
 *         for k from 0 <= k < n:             # <<<<<<<<<<<<<<
 *             CHKERR( STGetOperators(self.st, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {

    /* "SLEPc/ST.pyx":324
 *         cdef object operators = []
 *         for k from 0 <= k < n:
 *             CHKERR( STGetOperators(self.st, k, &mat) )             # <<<<<<<<<<<<<<
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)
 */
    __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetOperators(__pyx_v_self->st, __pyx_v_k, (&__pyx_v_mat))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 324, __pyx_L1_error)

    /* "SLEPc/ST.pyx":325
 *         for k from 0 <= k < n:
 *             CHKERR( STGetOperators(self.st, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *             operators.append(A)
 *         return tuple(operators)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_A, ((struct PyPetscMatObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_v_A->mat = __pyx_v_mat;
    __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

    /* "SLEPc/ST.pyx":326
 *             CHKERR( STGetOperators(self.st, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)             # <<<<<<<<<<<<<<
 *         return tuple(operators)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_operators, ((PyObject *)__pyx_v_A)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(0, 326, __pyx_L1_error)
  }

  /* "SLEPc/ST.pyx":327
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)
 *         return tuple(operators)             # <<<<<<<<<<<<<<
 * 
 *     def setMatStructure(self, structure):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":309
 *         CHKERR( STSetOperators(self.st, <PetscInt>n, mats) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_operators);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":329
 *         return tuple(operators)
 * 
 *     def setMatStructure(self, structure):             # <<<<<<<<<<<<<<
 *         """
 *         Sets an internal Mat.Structure attribute to indicate which is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_36setMatStructure[] = "ST.setMatStructure(self, structure)\n\n        Sets an internal Mat.Structure attribute to indicate which is\n        the relation of the sparsity pattern of the two matrices ``A``\n        and ``B`` constituting the generalized eigenvalue\n        problem. This function has no effect in the case of standard\n        eigenproblems.\n\n        Parameters\n        ----------\n        structure: `PETSc.Mat.Structure` enumerate\n                   Either same, different, or a subset of the non-zero\n                   sparsity pattern.\n\n        Notes\n        -----\n        By default, the sparsity patterns are assumed to be\n        different. If the patterns are equal or a subset then it is\n        recommended to set this attribute for efficiency reasons (in\n        particular, for internal *AXPY()* matrix operations).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_structure = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMatStructure (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_structure,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatStructure") < 0)) __PYX_ERR(0, 329, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_structure = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMatStructure", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 329, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatStructure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_structure);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_36setMatStructure(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_structure) {
  MatStructure __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MatStructure __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setMatStructure", 0);

  /* "SLEPc/ST.pyx":350
 *         particular, for internal *AXPY()* matrix operations).
 *         """
 *         cdef PetscMatStructure val = matstructure(structure)             # <<<<<<<<<<<<<<
 *         CHKERR( STSetMatStructure(self.st, val) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_1 == ((MatStructure)-1L))) __PYX_ERR(0, 350, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/ST.pyx":351
 *         """
 *         cdef PetscMatStructure val = matstructure(structure)
 *         CHKERR( STSetMatStructure(self.st, val) )             # <<<<<<<<<<<<<<
 * 
 *     def setKSP(self, KSP ksp not None):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetMatStructure(__pyx_v_self->st, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 351, __pyx_L1_error)

  /* "SLEPc/ST.pyx":329
 *         return tuple(operators)
 * 
 *     def setMatStructure(self, structure):             # <<<<<<<<<<<<<<
 *         """
 *         Sets an internal Mat.Structure attribute to indicate which is
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setMatStructure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":353
 *         CHKERR( STSetMatStructure(self.st, val) )
 * 
 *     def setKSP(self, KSP ksp not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the KSP object associated with the spectral
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_38setKSP[] = "ST.setKSP(self, KSP ksp)\n\n        Sets the KSP object associated with the spectral\n        transformation.\n\n        Parameters\n        ----------\n        ksp: KSP\n             The linear solver object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscKSPObject *__pyx_v_ksp = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKSP (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ksp,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ksp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKSP") < 0)) __PYX_ERR(0, 353, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ksp = ((struct PyPetscKSPObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKSP", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 353, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setKSP", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ksp), __pyx_ptype_8petsc4py_5PETSc_KSP, 0, "ksp", 0))) __PYX_ERR(0, 353, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_ksp);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_38setKSP(struct PySlepcSTObject *__pyx_v_self, struct PyPetscKSPObject *__pyx_v_ksp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setKSP", 0);

  /* "SLEPc/ST.pyx":363
 *              The linear solver object.
 *         """
 *         CHKERR( STSetKSP(self.st, ksp.ksp) )             # <<<<<<<<<<<<<<
 * 
 *     def getKSP(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetKSP(__pyx_v_self->st, __pyx_v_ksp->ksp)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 363, __pyx_L1_error)

  /* "SLEPc/ST.pyx":353
 *         CHKERR( STSetMatStructure(self.st, val) )
 * 
 *     def setKSP(self, KSP ksp not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the KSP object associated with the spectral
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setKSP", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":365
 *         CHKERR( STSetKSP(self.st, ksp.ksp) )
 * 
 *     def getKSP(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the KSP object associated with the spectral
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_40getKSP[] = "ST.getKSP(self)\n\n        Gets the KSP object associated with the spectral\n        transformation.\n\n        Returns\n        -------\n        ksp: KSP\n             The linear solver object.\n\n        Notes\n        -----\n        On output, the internal value of KSP can be ``NULL`` if the\n        combination of eigenproblem type and selected transformation\n        does not require to solve a linear system of equations.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKSP (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKSP", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKSP", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_40getKSP(struct PySlepcSTObject *__pyx_v_self) {
  struct PyPetscKSPObject *__pyx_v_ksp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getKSP", 0);

  /* "SLEPc/ST.pyx":381
 *         does not require to solve a linear system of equations.
 *         """
 *         cdef KSP ksp = KSP()             # <<<<<<<<<<<<<<
 *         CHKERR( STGetKSP(self.st, &ksp.ksp) )
 *         PetscINCREF(ksp.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_KSP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ksp = ((struct PyPetscKSPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/ST.pyx":382
 *         """
 *         cdef KSP ksp = KSP()
 *         CHKERR( STGetKSP(self.st, &ksp.ksp) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(ksp.obj)
 *         return ksp
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STGetKSP(__pyx_v_self->st, (&__pyx_v_ksp->ksp))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 382, __pyx_L1_error)

  /* "SLEPc/ST.pyx":383
 *         cdef KSP ksp = KSP()
 *         CHKERR( STGetKSP(self.st, &ksp.ksp) )
 *         PetscINCREF(ksp.obj)             # <<<<<<<<<<<<<<
 *         return ksp
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ksp->__pyx_base.obj);

  /* "SLEPc/ST.pyx":384
 *         CHKERR( STGetKSP(self.st, &ksp.ksp) )
 *         PetscINCREF(ksp.obj)
 *         return ksp             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ksp));
  __pyx_r = ((PyObject *)__pyx_v_ksp);
  goto __pyx_L0;

  /* "SLEPc/ST.pyx":365
 *         CHKERR( STSetKSP(self.st, ksp.ksp) )
 * 
 *     def getKSP(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the KSP object associated with the spectral
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.getKSP", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ksp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":388
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Prepares for the use of a spectral transformation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_42setUp[] = "ST.setUp(self)\n\n        Prepares for the use of a spectral transformation.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_42setUp(struct PySlepcSTObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/ST.pyx":392
 *         Prepares for the use of a spectral transformation.
 *         """
 *         CHKERR( STSetUp(self.st) )             # <<<<<<<<<<<<<<
 * 
 *     def apply(self, Vec x not None, Vec y not None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STSetUp(__pyx_v_self->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 392, __pyx_L1_error)

  /* "SLEPc/ST.pyx":388
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Prepares for the use of a spectral transformation.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":394
 *         CHKERR( STSetUp(self.st) )
 * 
 *     def apply(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Applies the spectral transformation operator to a vector, for
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_44apply[] = "ST.apply(self, Vec x, Vec y)\n\n        Applies the spectral transformation operator to a vector, for\n        instance ``(A - sB)^-1 B`` in the case of the shift-and-invert\n        tranformation and generalized eigenproblem.\n\n        Parameters\n        ----------\n        x: Vec\n           The input vector.\n        y: Vec\n           The result vector.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_45apply(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_x = 0;
  struct PyPetscVecObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply (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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply", 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, "apply") < 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_x = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_y = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(0, 394, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 394, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_44apply(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_44apply(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("apply", 0);

  /* "SLEPc/ST.pyx":407
 *            The result vector.
 *         """
 *         CHKERR( STApply(self.st, x.vec, y.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def applyTranspose(self, Vec x not None, Vec y not None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STApply(__pyx_v_self->st, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 407, __pyx_L1_error)

  /* "SLEPc/ST.pyx":394
 *         CHKERR( STSetUp(self.st) )
 * 
 *     def apply(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Applies the spectral transformation operator to a vector, for
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.apply", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":409
 *         CHKERR( STApply(self.st, x.vec, y.vec) )
 * 
 *     def applyTranspose(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Applies the transpose of the operator to a vector, for
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_46applyTranspose[] = "ST.applyTranspose(self, Vec x, Vec y)\n\n        Applies the transpose of the operator to a vector, for\n        instance ``B^T(A - sB)^-T`` in the case of the\n        shift-and-invert tranformation and generalized eigenproblem.\n\n        Parameters\n        ----------\n        x: Vec\n           The input vector.\n        y: Vec\n           The result vector.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_x = 0;
  struct PyPetscVecObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("applyTranspose (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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("applyTranspose", 1, 2, 2, 1); __PYX_ERR(0, 409, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyTranspose") < 0)) __PYX_ERR(0, 409, __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 = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_y = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("applyTranspose", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 409, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.applyTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(0, 409, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(0, 409, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_46applyTranspose(struct PySlepcSTObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("applyTranspose", 0);

  /* "SLEPc/ST.pyx":422
 *            The result vector.
 *         """
 *         CHKERR( STApplyTranspose(self.st, x.vec, y.vec) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STApplyTranspose(__pyx_v_self->st, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 422, __pyx_L1_error)

  /* "SLEPc/ST.pyx":409
 *         CHKERR( STApply(self.st, x.vec, y.vec) )
 * 
 *     def applyTranspose(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Applies the transpose of the operator to a vector, for
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.applyTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":426
 *     #
 * 
 *     def setCayleyAntishift(self, tau):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the value of the anti-shift for the Cayley spectral
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2ST_48setCayleyAntishift[] = "ST.setCayleyAntishift(self, tau)\n\n        Sets the value of the anti-shift for the Cayley spectral\n        transformation.\n\n        Parameters\n        ----------\n        tau: scalar (possibly complex)\n             The anti-shift.\n\n        Notes\n        -----\n\n        In the generalized Cayley transform, the operator can be\n        expressed as ``OP = inv(A - sigma B)*(A + tau B)``. This\n        function sets the value of `tau`.  Use `setShift()` for\n        setting ``sigma``.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tau = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCayleyAntishift (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tau,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tau)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCayleyAntishift") < 0)) __PYX_ERR(0, 426, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_tau = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCayleyAntishift", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 426, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setCayleyAntishift", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(((struct PySlepcSTObject *)__pyx_v_self), __pyx_v_tau);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_48setCayleyAntishift(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_tau) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setCayleyAntishift", 0);

  /* "SLEPc/ST.pyx":444
 *         setting ``sigma``.
 *         """
 *         cdef PetscScalar sval = asScalar(tau)             # <<<<<<<<<<<<<<
 *         CHKERR( STCayleySetAntishift(self.st, sval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_tau); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/ST.pyx":445
 *         """
 *         cdef PetscScalar sval = asScalar(tau)
 *         CHKERR( STCayleySetAntishift(self.st, sval) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(STCayleySetAntishift(__pyx_v_self->st, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 445, __pyx_L1_error)

  /* "SLEPc/ST.pyx":426
 *     #
 * 
 *     def setCayleyAntishift(self, tau):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the value of the anti-shift for the Cayley spectral
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.setCayleyAntishift", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":450
 * 
 *     property shift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getShift()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_5shift___get__(struct PySlepcSTObject *__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("__get__", 0);

  /* "SLEPc/ST.pyx":451
 *     property shift:
 *         def __get__(self):
 *             return self.getShift()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setShift(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getShift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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, 451, __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, 451, __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;

  /* "SLEPc/ST.pyx":450
 * 
 *     property shift:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getShift()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.shift.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":452
 *         def __get__(self):
 *             return self.getShift()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setShift(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_2ST_5shift_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/ST.pyx":453
 *             return self.getShift()
 *         def __set__(self, value):
 *             self.setShift(value)             # <<<<<<<<<<<<<<
 * 
 *     property mat_mode:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setShift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 453, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __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;

  /* "SLEPc/ST.pyx":452
 *         def __get__(self):
 *             return self.getShift()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setShift(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.ST.shift.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":456
 * 
 *     property mat_mode:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getMatMode()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode___get__(struct PySlepcSTObject *__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("__get__", 0);

  /* "SLEPc/ST.pyx":457
 *     property mat_mode:
 *         def __get__(self):
 *             return self.getMatMode()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setMatMode(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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, 457, __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, 457, __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;

  /* "SLEPc/ST.pyx":456
 * 
 *     property mat_mode:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getMatMode()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.mat_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":458
 *         def __get__(self):
 *             return self.getMatMode()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setMatMode(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_2ST_8mat_mode_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/ST.pyx":459
 *             return self.getMatMode()
 *         def __set__(self, value):
 *             self.setMatMode(value)             # <<<<<<<<<<<<<<
 * 
 *     property ksp:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __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;

  /* "SLEPc/ST.pyx":458
 *         def __get__(self):
 *             return self.getMatMode()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setMatMode(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.ST.mat_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":462
 * 
 *     property ksp:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getKSP()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(((struct PySlepcSTObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2ST_3ksp___get__(struct PySlepcSTObject *__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("__get__", 0);

  /* "SLEPc/ST.pyx":463
 *     property ksp:
 *         def __get__(self):
 *             return self.getKSP()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setKSP(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getKSP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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, 463, __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, 463, __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;

  /* "SLEPc/ST.pyx":462
 * 
 *     property ksp:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getKSP()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.ST.ksp.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/ST.pyx":464
 *         def __get__(self):
 *             return self.getKSP()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setKSP(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(((struct PySlepcSTObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_2ST_3ksp_2__set__(struct PySlepcSTObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/ST.pyx":465
 *             return self.getKSP()
 *         def __set__(self, value):
 *             self.setKSP(value)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setKSP); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __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;

  /* "SLEPc/ST.pyx":464
 *         def __get__(self):
 *             return self.getKSP()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setKSP(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.ST.ksp.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":59
 *     BlockType        = BVOrthogBlockType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.bv
 *         self.bv = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(((struct PySlepcBVObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_2BV___cinit__(struct PySlepcBVObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/BV.pyx":60
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.bv             # <<<<<<<<<<<<<<
 *         self.bv = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->bv));

  /* "SLEPc/BV.pyx":61
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.bv
 *         self.bv = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->bv = NULL;

  /* "SLEPc/BV.pyx":59
 *     BlockType        = BVOrthogBlockType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.bv
 *         self.bv = NULL
 */

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

/* "SLEPc/BV.pyx":63
 *         self.bv = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the BV data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_2view[] = "BV.view(self, Viewer viewer=None)\n\n        Prints the BV data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(3, 63, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 63, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(3, 63, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_2view(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_2view(struct PySlepcBVObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/BV.pyx":73
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( BVView(self.bv, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/BV.pyx":74
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( BVView(self.bv, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/BV.pyx":75
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( BVView(self.bv, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVView(__pyx_v_self->bv, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 75, __pyx_L1_error)

  /* "SLEPc/BV.pyx":63
 *         self.bv = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the BV data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":77
 *         CHKERR( BVView(self.bv, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the BV object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_4destroy[] = "BV.destroy(self)\n\n        Destroys the BV object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_4destroy(struct PySlepcBVObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/BV.pyx":81
 *         Destroys the BV object.
 *         """
 *         CHKERR( BVDestroy(&self.bv) )             # <<<<<<<<<<<<<<
 *         self.bv = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDestroy((&__pyx_v_self->bv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 81, __pyx_L1_error)

  /* "SLEPc/BV.pyx":82
 *         """
 *         CHKERR( BVDestroy(&self.bv) )
 *         self.bv = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->bv = NULL;

  /* "SLEPc/BV.pyx":83
 *         CHKERR( BVDestroy(&self.bv) )
 *         self.bv = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":77
 *         CHKERR( BVView(self.bv, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the BV object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":85
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the BV object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_6create[] = "BV.create(self, comm=None)\n\n        Creates the BV object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(3, 85, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 85, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_6create(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_6create(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  BV __pyx_v_newbv;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/BV.pyx":95
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcBV newbv = NULL
 *         CHKERR( BVCreate(ccomm, &newbv) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 95, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/BV.pyx":96
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcBV newbv = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( BVCreate(ccomm, &newbv) )
 *         SlepcCLEAR(self.obj); self.bv = newbv
 */
  __pyx_v_newbv = NULL;

  /* "SLEPc/BV.pyx":97
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcBV newbv = NULL
 *         CHKERR( BVCreate(ccomm, &newbv) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.bv = newbv
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_ccomm, (&__pyx_v_newbv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 97, __pyx_L1_error)

  /* "SLEPc/BV.pyx":98
 *         cdef SlepcBV newbv = NULL
 *         CHKERR( BVCreate(ccomm, &newbv) )
 *         SlepcCLEAR(self.obj); self.bv = newbv             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->bv = __pyx_v_newbv;

  /* "SLEPc/BV.pyx":99
 *         CHKERR( BVCreate(ccomm, &newbv) )
 *         SlepcCLEAR(self.obj); self.bv = newbv
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def duplicate(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":85
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the BV object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":101
 *         return self
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """
 *         Duplicate the BV object with the same type and dimensions.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_8duplicate[] = "BV.duplicate(self)\n\n        Duplicate the BV object with the same type and dimensions.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duplicate (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("duplicate", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "duplicate", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_8duplicate(struct PySlepcBVObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  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("duplicate", 0);

  /* "SLEPc/BV.pyx":105
 *         Duplicate the BV object with the same type and dimensions.
 *         """
 *         cdef BV bv = type(self)()             # <<<<<<<<<<<<<<
 *         CHKERR( BVDuplicate(self.bv, &bv.bv) )
 *         return bv
 */
  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  __pyx_t_2 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 105, __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(3, 105, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8slepc4py_5SLEPc_BV))))) __PYX_ERR(3, 105, __pyx_L1_error)
  __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":106
 *         """
 *         cdef BV bv = type(self)()
 *         CHKERR( BVDuplicate(self.bv, &bv.bv) )             # <<<<<<<<<<<<<<
 *         return bv
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDuplicate(__pyx_v_self->bv, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 106, __pyx_L1_error)

  /* "SLEPc/BV.pyx":107
 *         cdef BV bv = type(self)()
 *         CHKERR( BVDuplicate(self.bv, &bv.bv) )
 *         return bv             # <<<<<<<<<<<<<<
 * 
 *     def copy(self, BV result=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bv));
  __pyx_r = ((PyObject *)__pyx_v_bv);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":101
 *         return self
 * 
 *     def duplicate(self):             # <<<<<<<<<<<<<<
 *         """
 *         Duplicate the BV object with the same type and dimensions.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.duplicate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":109
 *         return bv
 * 
 *     def copy(self, BV result=None):             # <<<<<<<<<<<<<<
 *         if result is None:
 *             result = type(self)()
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_10copy[] = "BV.copy(self, BV result=None)";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_11copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_result = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_result,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PySlepcBVObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "copy") < 0)) __PYX_ERR(3, 109, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_result = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("copy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 109, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_result), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "result", 0))) __PYX_ERR(3, 109, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_10copy(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_result);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_10copy(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_result) {
  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;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("copy", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_result);

  /* "SLEPc/BV.pyx":110
 * 
 *     def copy(self, BV result=None):
 *         if result is None:             # <<<<<<<<<<<<<<
 *             result = type(self)()
 *         if result.bv == NULL:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_result) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":111
 *     def copy(self, BV result=None):
 *         if result is None:
 *             result = type(self)()             # <<<<<<<<<<<<<<
 *         if result.bv == NULL:
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )
 */
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __pyx_t_4 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && 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_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 111, __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(3, 111, __pyx_L1_error)
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8slepc4py_5SLEPc_BV))))) __PYX_ERR(3, 111, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_result, ((struct PySlepcBVObject *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "SLEPc/BV.pyx":110
 * 
 *     def copy(self, BV result=None):
 *         if result is None:             # <<<<<<<<<<<<<<
 *             result = type(self)()
 *         if result.bv == NULL:
 */
  }

  /* "SLEPc/BV.pyx":112
 *         if result is None:
 *             result = type(self)()
 *         if result.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )
 *         CHKERR( BVCopy(self.bv, result.bv) )
 */
  __pyx_t_2 = ((__pyx_v_result->bv == NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":113
 *             result = type(self)()
 *         if result.bv == NULL:
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )             # <<<<<<<<<<<<<<
 *         CHKERR( BVCopy(self.bv, result.bv) )
 *         return result
 */
    __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDuplicate(__pyx_v_self->bv, (&__pyx_v_result->bv))); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(3, 113, __pyx_L1_error)

    /* "SLEPc/BV.pyx":112
 *         if result is None:
 *             result = type(self)()
 *         if result.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )
 *         CHKERR( BVCopy(self.bv, result.bv) )
 */
  }

  /* "SLEPc/BV.pyx":114
 *         if result.bv == NULL:
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )
 *         CHKERR( BVCopy(self.bv, result.bv) )             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCopy(__pyx_v_self->bv, __pyx_v_result->bv)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(3, 114, __pyx_L1_error)

  /* "SLEPc/BV.pyx":115
 *             CHKERR( BVDuplicate(self.bv, &result.bv) )
 *         CHKERR( BVCopy(self.bv, result.bv) )
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, bv_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":109
 *         return bv
 * 
 *     def copy(self, BV result=None):             # <<<<<<<<<<<<<<
 *         if result is None:
 *             result = type(self)()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":117
 *         return result
 * 
 *     def setType(self, bv_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the BV object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_12setType[] = "BV.setType(self, bv_type)\n\n        Selects the type for the BV object.\n\n        Parameters\n        ----------\n        bv_type: `BV.Type` enumerate\n                  The inner product type to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_13setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_bv_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(3, 117, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_bv_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 117, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_12setType(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_bv_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_12setType(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_bv_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_bv_type);

  /* "SLEPc/BV.pyx":126
 *                   The inner product type to be used.
 *         """
 *         cdef SlepcBVType cval = NULL             # <<<<<<<<<<<<<<
 *         bv_type = str2bytes(bv_type, &cval)
 *         CHKERR( BVSetType(self.bv, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/BV.pyx":127
 *         """
 *         cdef SlepcBVType cval = NULL
 *         bv_type = str2bytes(bv_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetType(self.bv, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_bv_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_bv_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":128
 *         cdef SlepcBVType cval = NULL
 *         bv_type = str2bytes(bv_type, &cval)
 *         CHKERR( BVSetType(self.bv, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_self->bv, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 128, __pyx_L1_error)

  /* "SLEPc/BV.pyx":117
 *         return result
 * 
 *     def setType(self, bv_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the BV object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_bv_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":130
 *         CHKERR( BVSetType(self.bv, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the BV type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_15getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_14getType[] = "BV.getType(self)\n\n        Gets the BV type of this object.\n\n        Returns\n        -------\n        type: `BV.Type` enumerate\n              The inner product type currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_15getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_14getType(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_14getType(struct PySlepcBVObject *__pyx_v_self) {
  const char* __pyx_v_bv_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/BV.pyx":139
 *               The inner product type currently being used.
 *         """
 *         cdef SlepcBVType bv_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetType(self.bv, &bv_type) )
 *         return bytes2str(bv_type)
 */
  __pyx_v_bv_type = NULL;

  /* "SLEPc/BV.pyx":140
 *         """
 *         cdef SlepcBVType bv_type = NULL
 *         CHKERR( BVGetType(self.bv, &bv_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(bv_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 140, __pyx_L1_error)

  /* "SLEPc/BV.pyx":141
 *         cdef SlepcBVType bv_type = NULL
 *         CHKERR( BVGetType(self.bv, &bv_type) )
 *         return bytes2str(bv_type)             # <<<<<<<<<<<<<<
 * 
 *     def setSizes(self, sizes, m):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_bv_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":130
 *         CHKERR( BVSetType(self.bv, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the BV type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":143
 *         return bytes2str(bv_type)
 * 
 *     def setSizes(self, sizes, m):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the local and global sizes, and the number of columns.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_16setSizes[] = "BV.setSizes(self, sizes, m)\n\n        Sets the local and global sizes, and the number of columns.\n\n        Parameters\n        ----------\n        sizes: int or two-tuple of int\n              The global size ``N`` or a two-tuple ``(n, N)``\n              with the local and global sizes.\n        m: int\n              The number of columns.\n\n        Notes\n        -----\n        Either ``n`` or ``N`` (but not both) can be ``PETSc.DECIDE``\n        or ``None`` to have it automatically set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sizes = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSizes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sizes,&__pyx_n_s_m,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sizes)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setSizes", 1, 2, 2, 1); __PYX_ERR(3, 143, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizes") < 0)) __PYX_ERR(3, 143, __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_sizes = values[0];
    __pyx_v_m = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setSizes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 143, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_sizes, __pyx_v_m);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_16setSizes(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_m) {
  PetscInt __pyx_v_n;
  PetscInt __pyx_v_N;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setSizes", 0);

  /* "SLEPc/BV.pyx":160
 *         or ``None`` to have it automatically set.
 *         """
 *         cdef PetscInt n=0, N=0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival = asInt(m)
 *         BV_Sizes(sizes, &n, &N)
 */
  __pyx_v_n = 0;
  __pyx_v_N = 0;

  /* "SLEPc/BV.pyx":161
 *         """
 *         cdef PetscInt n=0, N=0
 *         cdef PetscInt ival = asInt(m)             # <<<<<<<<<<<<<<
 *         BV_Sizes(sizes, &n, &N)
 *         CHKERR( BVSetSizes(self.bv, n, N, ival) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(3, 161, __pyx_L1_error)
  __pyx_v_ival = __pyx_t_1;

  /* "SLEPc/BV.pyx":162
 *         cdef PetscInt n=0, N=0
 *         cdef PetscInt ival = asInt(m)
 *         BV_Sizes(sizes, &n, &N)             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetSizes(self.bv, n, N, ival) )
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_BV_Sizes(__pyx_v_sizes, (&__pyx_v_n), (&__pyx_v_N)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 162, __pyx_L1_error)

  /* "SLEPc/BV.pyx":163
 *         cdef PetscInt ival = asInt(m)
 *         BV_Sizes(sizes, &n, &N)
 *         CHKERR( BVSetSizes(self.bv, n, N, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def setSizesFromVec(self, Vec w not None, m):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_self->bv, __pyx_v_n, __pyx_v_N, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 163, __pyx_L1_error)

  /* "SLEPc/BV.pyx":143
 *         return bytes2str(bv_type)
 * 
 *     def setSizes(self, sizes, m):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the local and global sizes, and the number of columns.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":165
 *         CHKERR( BVSetSizes(self.bv, n, N, ival) )
 * 
 *     def setSizesFromVec(self, Vec w not None, m):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the local and global sizes, and the number of columns. Local and
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizesFromVec[] = "BV.setSizesFromVec(self, Vec w, m)\n\n        Sets the local and global sizes, and the number of columns. Local and\n        global sizes are specified indirectly by passing a template vector.\n\n        Parameters\n        ----------\n        w: Vec\n            The template vector.\n        m: int\n            The number of columns.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_w = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSizesFromVec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_w,&__pyx_n_s_m,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setSizesFromVec", 1, 2, 2, 1); __PYX_ERR(3, 165, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSizesFromVec") < 0)) __PYX_ERR(3, 165, __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_w = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_m = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setSizesFromVec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 165, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizesFromVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "w", 0))) __PYX_ERR(3, 165, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_w, __pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_18setSizesFromVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_w, PyObject *__pyx_v_m) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setSizesFromVec", 0);

  /* "SLEPc/BV.pyx":177
 *             The number of columns.
 *         """
 *         cdef PetscInt ival = asInt(m)             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(3, 177, __pyx_L1_error)
  __pyx_v_ival = __pyx_t_1;

  /* "SLEPc/BV.pyx":178
 *         """
 *         cdef PetscInt ival = asInt(m)
 *         CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getSizes(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizesFromVec(__pyx_v_self->bv, __pyx_v_w->vec, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 178, __pyx_L1_error)

  /* "SLEPc/BV.pyx":165
 *         CHKERR( BVSetSizes(self.bv, n, N, ival) )
 * 
 *     def setSizesFromVec(self, Vec w not None, m):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the local and global sizes, and the number of columns. Local and
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setSizesFromVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":180
 *         CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) )
 * 
 *     def getSizes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the local and global sizes, and the number of columns.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_20getSizes[] = "BV.getSizes(self)\n\n        Returns the local and global sizes, and the number of columns.\n\n        Returns\n        -------\n        sizes: two-tuple of int\n                The local and global sizes ``(n, N)``.\n        m: int\n                The number of columns.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSizes (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getSizes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getSizes", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_20getSizes(struct PySlepcBVObject *__pyx_v_self) {
  PetscInt __pyx_v_n;
  PetscInt __pyx_v_N;
  PetscInt __pyx_v_m;
  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;
  __Pyx_RefNannySetupContext("getSizes", 0);

  /* "SLEPc/BV.pyx":191
 *                 The number of columns.
 *         """
 *         cdef PetscInt n=0, N=0, m=0             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetSizes(self.bv, &n, &N, &m) )
 *         return ((toInt(n), toInt(N)), toInt(m))
 */
  __pyx_v_n = 0;
  __pyx_v_N = 0;
  __pyx_v_m = 0;

  /* "SLEPc/BV.pyx":192
 *         """
 *         cdef PetscInt n=0, N=0, m=0
 *         CHKERR( BVGetSizes(self.bv, &n, &N, &m) )             # <<<<<<<<<<<<<<
 *         return ((toInt(n), toInt(N)), toInt(m))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, (&__pyx_v_n), (&__pyx_v_N), (&__pyx_v_m))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 192, __pyx_L1_error)

  /* "SLEPc/BV.pyx":193
 *         cdef PetscInt n=0, N=0, m=0
 *         CHKERR( BVGetSizes(self.bv, &n, &N, &m) )
 *         return ((toInt(n), toInt(N)), toInt(m))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_N); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":180
 *         CHKERR( BVSetSizesFromVec(self.bv, w.vec, ival) )
 * 
 *     def getSizes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the local and global sizes, and the number of columns.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getSizes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":196
 * 
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all BV options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_22setOptionsPrefix[] = "BV.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all BV options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all BV option\n                requests.\n\n        Notes\n        -----\n        A hyphen (``-``) must NOT be given at the beginning of the\n        prefix name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(3, 196, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 196, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_22setOptionsPrefix(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/BV.pyx":213
 *         AUTOMATICALLY the hyphen.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( BVSetOptionsPrefix(self.bv, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/BV.pyx":214
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetOptionsPrefix(self.bv, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":215
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( BVSetOptionsPrefix(self.bv, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOptionsPrefix(__pyx_v_self->bv, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 215, __pyx_L1_error)

  /* "SLEPc/BV.pyx":196
 * 
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all BV options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":217
 *         CHKERR( BVSetOptionsPrefix(self.bv, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all BV options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_24getOptionsPrefix[] = "BV.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all BV options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this BV object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_24getOptionsPrefix(struct PySlepcBVObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/BV.pyx":227
 *                 The prefix string set for this BV object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetOptionsPrefix(self.bv, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/BV.pyx":228
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( BVGetOptionsPrefix(self.bv, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOptionsPrefix(__pyx_v_self->bv, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 228, __pyx_L1_error)

  /* "SLEPc/BV.pyx":229
 *         cdef const_char *prefix = NULL
 *         CHKERR( BVGetOptionsPrefix(self.bv, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":217
 *         CHKERR( BVSetOptionsPrefix(self.bv, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all BV options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":231
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets BV options from the options database.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_26setFromOptions[] = "BV.setFromOptions(self)\n\n        Sets BV options from the options database.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_26setFromOptions(struct PySlepcBVObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/BV.pyx":240
 *         option.
 *         """
 *         CHKERR( BVSetFromOptions(self.bv) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetFromOptions(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 240, __pyx_L1_error)

  /* "SLEPc/BV.pyx":231
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets BV options from the options database.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":244
 *     #
 * 
 *     def getOrthogonalization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the orthogonalization settings from the BV object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_28getOrthogonalization[] = "BV.getOrthogonalization(self)\n\n        Gets the orthogonalization settings from the BV object.\n\n        Returns\n        -------\n        type: `BV.OrthogType` enumerate\n              The type of orthogonalization technique.\n        refine: `BV.OrthogRefineType` enumerate\n              The type of refinement.\n        eta:  float\n              Parameter for selective refinement (used when the the\n              refinement type `BV.OrthogRefineType.IFNEEDED`).\n        block: `BV.OrthogBlockType` enumerate\n              The type of block orthogonalization .\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOrthogonalization (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOrthogonalization", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOrthogonalization", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_28getOrthogonalization(struct PySlepcBVObject *__pyx_v_self) {
  BVOrthogType __pyx_v_val1;
  BVOrthogRefineType __pyx_v_val2;
  BVOrthogBlockType __pyx_v_val3;
  PetscReal __pyx_v_rval;
  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;
  __Pyx_RefNannySetupContext("getOrthogonalization", 0);

  /* "SLEPc/BV.pyx":260
 *               The type of block orthogonalization .
 *         """
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 */
  __pyx_v_val1 = BV_ORTHOG_CGS;

  /* "SLEPc/BV.pyx":261
 *         """
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 */
  __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED;

  /* "SLEPc/BV.pyx":262
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 */
  __pyx_v_val3 = BV_ORTHOG_BLOCK_GS;

  /* "SLEPc/BV.pyx":263
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         return (val1, val2, toReal(rval), val3)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/BV.pyx":264
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )             # <<<<<<<<<<<<<<
 *         return (val1, val2, toReal(rval), val3)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 264, __pyx_L1_error)

  /* "SLEPc/BV.pyx":265
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         return (val1, val2, toReal(rval), val3)             # <<<<<<<<<<<<<<
 * 
 *     def setOrthogonalization(self, type=None, refine=None, eta=None, block=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_BVOrthogType(__pyx_v_val1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_BVOrthogRefineType(__pyx_v_val2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(__pyx_v_val3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":244
 *     #
 * 
 *     def getOrthogonalization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the orthogonalization settings from the BV object.
 */

  /* 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("slepc4py.SLEPc.BV.getOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":267
 *         return (val1, val2, toReal(rval), val3)
 * 
 *     def setOrthogonalization(self, type=None, refine=None, eta=None, block=None):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the method used for the orthogonalization of vectors
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_30setOrthogonalization[] = "BV.setOrthogonalization(self, type=None, refine=None, eta=None, block=None)\n\n        Specifies the method used for the orthogonalization of vectors\n        (classical or modified Gram-Schmidt with or without refinement),\n        and for the block-orthogonalization (simultaneous orthogonalization\n        of a set of vectors).\n\n        Parameters\n        ----------\n        type: `BV.OrthogType` enumerate, optional\n              The type of orthogonalization technique.\n        refine: `BV.OrthogRefineType` enumerate, optional\n              The type of refinement.\n        eta:  float, optional\n              Parameter for selective refinement.\n        block: `BV.OrthogBlockType` enumerate, optional\n              The type of block orthogonalization.\n\n        Notes\n        -----\n        The default settings work well for most problems.\n\n        The parameter `eta` should be a real value between ``0`` and\n        ``1`` (or `DEFAULT`).  The value of `eta` is used only when\n        the refinement type is `BV.OrthogRefineType.IFNEEDED`.\n\n        When using several processors, `BV.OrthogType.MGS` is likely to\n        result in bad scalability.\n\n        If the method set for block orthogonalization is GS, then the\n        computation is done column by column with the vector orthogonalization.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_type = 0;
  PyObject *__pyx_v_refine = 0;
  PyObject *__pyx_v_eta = 0;
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOrthogonalization (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_refine,&__pyx_n_s_eta,&__pyx_n_s_block,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refine);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eta);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOrthogonalization") < 0)) __PYX_ERR(3, 267, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_type = values[0];
    __pyx_v_refine = values[1];
    __pyx_v_eta = values[2];
    __pyx_v_block = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOrthogonalization", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 267, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_type, __pyx_v_refine, __pyx_v_eta, __pyx_v_block);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_30setOrthogonalization(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_type, PyObject *__pyx_v_refine, PyObject *__pyx_v_eta, PyObject *__pyx_v_block) {
  BVOrthogType __pyx_v_val1;
  BVOrthogRefineType __pyx_v_val2;
  BVOrthogBlockType __pyx_v_val3;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  BVOrthogType __pyx_t_4;
  BVOrthogRefineType __pyx_t_5;
  BVOrthogBlockType __pyx_t_6;
  PetscReal __pyx_t_7;
  __Pyx_RefNannySetupContext("setOrthogonalization", 0);

  /* "SLEPc/BV.pyx":299
 *         computation is done column by column with the vector orthogonalization.
 *         """
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 */
  __pyx_v_val1 = BV_ORTHOG_CGS;

  /* "SLEPc/BV.pyx":300
 *         """
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 */
  __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED;

  /* "SLEPc/BV.pyx":301
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 */
  __pyx_v_val3 = BV_ORTHOG_BLOCK_GS;

  /* "SLEPc/BV.pyx":302
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if type   is not None: val1 = type
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/BV.pyx":303
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )             # <<<<<<<<<<<<<<
 *         if type   is not None: val1 = type
 *         if refine is not None: val2 = refine
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 303, __pyx_L1_error)

  /* "SLEPc/BV.pyx":304
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if type   is not None: val1 = type             # <<<<<<<<<<<<<<
 *         if refine is not None: val2 = refine
 *         if block  is not None: val3 = block
 */
  __pyx_t_2 = (__pyx_v_type != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = ((BVOrthogType)__Pyx_PyInt_As_BVOrthogType(__pyx_v_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 304, __pyx_L1_error)
    __pyx_v_val1 = __pyx_t_4;
  }

  /* "SLEPc/BV.pyx":305
 *         CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if type   is not None: val1 = type
 *         if refine is not None: val2 = refine             # <<<<<<<<<<<<<<
 *         if block  is not None: val3 = block
 *         if eta    is not None: rval = asReal(eta)
 */
  __pyx_t_3 = (__pyx_v_refine != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_5 = ((BVOrthogRefineType)__Pyx_PyInt_As_BVOrthogRefineType(__pyx_v_refine)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 305, __pyx_L1_error)
    __pyx_v_val2 = __pyx_t_5;
  }

  /* "SLEPc/BV.pyx":306
 *         if type   is not None: val1 = type
 *         if refine is not None: val2 = refine
 *         if block  is not None: val3 = block             # <<<<<<<<<<<<<<
 *         if eta    is not None: rval = asReal(eta)
 *         CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) )
 */
  __pyx_t_2 = (__pyx_v_block != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_6 = ((BVOrthogBlockType)__Pyx_PyInt_As_BVOrthogBlockType(__pyx_v_block)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 306, __pyx_L1_error)
    __pyx_v_val3 = __pyx_t_6;
  }

  /* "SLEPc/BV.pyx":307
 *         if refine is not None: val2 = refine
 *         if block  is not None: val3 = block
 *         if eta    is not None: rval = asReal(eta)             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) )
 * 
 */
  __pyx_t_3 = (__pyx_v_eta != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_eta); if (unlikely(__pyx_t_7 == -1.0 && PyErr_Occurred())) __PYX_ERR(3, 307, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_7;
  }

  /* "SLEPc/BV.pyx":308
 *         if block  is not None: val3 = block
 *         if eta    is not None: rval = asReal(eta)
 *         CHKERR( BVSetOrthogonalization(self.bv, val1, val2, rval, val3) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_self->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 308, __pyx_L1_error)

  /* "SLEPc/BV.pyx":267
 *         return (val1, val2, toReal(rval), val3)
 * 
 *     def setOrthogonalization(self, type=None, refine=None, eta=None, block=None):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the method used for the orthogonalization of vectors
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setOrthogonalization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":312
 *     #
 * 
 *     def getMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the matrix representation of the inner product.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_32getMatrix[] = "BV.getMatrix(self)\n\n        Retrieves the matrix representation of the inner product.\n\n        Returns\n        -------\n        mat: the matrix of the inner product\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMatrix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMatrix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_32getMatrix(struct PySlepcBVObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_mat = 0;
  PetscBool __pyx_v_indef;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getMatrix", 0);

  /* "SLEPc/BV.pyx":320
 *         mat: the matrix of the inner product
 *         """
 *         cdef Mat mat = Mat()             # <<<<<<<<<<<<<<
 *         cdef PetscBool indef = PETSC_FALSE
 *         CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) )
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_mat = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":321
 *         """
 *         cdef Mat mat = Mat()
 *         cdef PetscBool indef = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) )
 *         PetscINCREF(mat.obj)
 */
  __pyx_v_indef = PETSC_FALSE;

  /* "SLEPc/BV.pyx":322
 *         cdef Mat mat = Mat()
 *         cdef PetscBool indef = PETSC_FALSE
 *         CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(mat.obj)
 *         return mat, <bint>indef
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetMatrix(__pyx_v_self->bv, (&__pyx_v_mat->mat), (&__pyx_v_indef))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 322, __pyx_L1_error)

  /* "SLEPc/BV.pyx":323
 *         cdef PetscBool indef = PETSC_FALSE
 *         CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) )
 *         PetscINCREF(mat.obj)             # <<<<<<<<<<<<<<
 *         return mat, <bint>indef
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_mat->__pyx_base.obj);

  /* "SLEPc/BV.pyx":324
 *         CHKERR( BVGetMatrix(self.bv, &mat.mat, &indef) )
 *         PetscINCREF(mat.obj)
 *         return mat, <bint>indef             # <<<<<<<<<<<<<<
 * 
 *     def setMatrix(self, Mat mat, bint indef):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_PetscBool(__pyx_v_indef); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_mat));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_mat));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_mat));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":312
 *     #
 * 
 *     def getMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieves the matrix representation of the inner product.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_mat);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":326
 *         return mat, <bint>indef
 * 
 *     def setMatrix(self, Mat mat, bint indef):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the bilinear form to be used for inner products.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_34setMatrix[] = "BV.setMatrix(self, Mat mat, bool indef)\n\n        Sets the bilinear form to be used for inner products.\n\n        Parameters\n        ----------\n        mat:  Mat, optional\n              The matrix of the inner product.\n        indef: bool, optional\n               Whether the matrix is indefinite\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_mat = 0;
  int __pyx_v_indef;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mat,&__pyx_n_s_indef,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_indef)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setMatrix", 1, 2, 2, 1); __PYX_ERR(3, 326, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMatrix") < 0)) __PYX_ERR(3, 326, __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_mat = ((struct PyPetscMatObject *)values[0]);
    __pyx_v_indef = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_indef == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 326, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMatrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "mat", 0))) __PYX_ERR(3, 326, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_mat, __pyx_v_indef);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_34setMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_mat, int __pyx_v_indef) {
  Mat __pyx_v_m;
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  int __pyx_t_2;
  PetscBool __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setMatrix", 0);

  /* "SLEPc/BV.pyx":337
 *                Whether the matrix is indefinite
 *         """
 *         cdef PetscMat m = NULL if mat is None else mat.mat             # <<<<<<<<<<<<<<
 *         cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE
 *         CHKERR( BVSetMatrix(self.bv, m, tval) )
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_mat) == Py_None);
  if ((__pyx_t_2 != 0)) {
    __pyx_t_1 = NULL;
  } else {
    __pyx_t_1 = __pyx_v_mat->mat;
  }
  __pyx_v_m = __pyx_t_1;

  /* "SLEPc/BV.pyx":338
 *         """
 *         cdef PetscMat m = NULL if mat is None else mat.mat
 *         cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( BVSetMatrix(self.bv, m, tval) )
 * 
 */
  if ((__pyx_v_indef != 0)) {
    __pyx_t_3 = PETSC_TRUE;
  } else {
    __pyx_t_3 = PETSC_FALSE;
  }
  __pyx_v_tval = __pyx_t_3;

  /* "SLEPc/BV.pyx":339
 *         cdef PetscMat m = NULL if mat is None else mat.mat
 *         cdef PetscBool tval = PETSC_TRUE if indef else PETSC_FALSE
 *         CHKERR( BVSetMatrix(self.bv, m, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def applyMatrix(self, Vec x not None, Vec y not None):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetMatrix(__pyx_v_self->bv, __pyx_v_m, __pyx_v_tval)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 339, __pyx_L1_error)

  /* "SLEPc/BV.pyx":326
 *         return mat, <bint>indef
 * 
 *     def setMatrix(self, Mat mat, bint indef):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the bilinear form to be used for inner products.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":341
 *         CHKERR( BVSetMatrix(self.bv, m, tval) )
 * 
 *     def applyMatrix(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Multiplies a vector with the matrix associated to the bilinear
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_36applyMatrix[] = "BV.applyMatrix(self, Vec x, Vec y)\n\n        Multiplies a vector with the matrix associated to the bilinear\n        form.\n\n        Parameters\n        ----------\n        x: Vec\n           The input vector.\n        y: Vec\n           The result vector.\n\n        Notes\n        -----\n        If the bilinear form has no associated matrix this function\n        copies the vector.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_x = 0;
  struct PyPetscVecObject *__pyx_v_y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("applyMatrix (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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("applyMatrix", 1, 2, 2, 1); __PYX_ERR(3, 341, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "applyMatrix") < 0)) __PYX_ERR(3, 341, __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 = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_y = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("applyMatrix", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 341, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.applyMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(3, 341, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(3, 341, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_36applyMatrix(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_x, struct PyPetscVecObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("applyMatrix", 0);

  /* "SLEPc/BV.pyx":358
 *         copies the vector.
 *         """
 *         CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def setActiveColumns(self, int l, int k):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVApplyMatrix(__pyx_v_self->bv, __pyx_v_x->vec, __pyx_v_y->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 358, __pyx_L1_error)

  /* "SLEPc/BV.pyx":341
 *         CHKERR( BVSetMatrix(self.bv, m, tval) )
 * 
 *     def applyMatrix(self, Vec x not None, Vec y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Multiplies a vector with the matrix associated to the bilinear
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.applyMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":360
 *         CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) )
 * 
 *     def setActiveColumns(self, int l, int k):             # <<<<<<<<<<<<<<
 *         """
 *         Specify the columns that will be involved in operations.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_38setActiveColumns[] = "BV.setActiveColumns(self, int l, int k)\n\n        Specify the columns that will be involved in operations.\n\n        Parameters\n        ----------\n        l: int\n            The leading number of columns.\n        k: int\n            The active number of columns.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_l;
  int __pyx_v_k;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setActiveColumns (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_l,&__pyx_n_s_k,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setActiveColumns", 1, 2, 2, 1); __PYX_ERR(3, 360, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setActiveColumns") < 0)) __PYX_ERR(3, 360, __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_l = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_l == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 360, __pyx_L3_error)
    __pyx_v_k = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 360, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setActiveColumns", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 360, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_l, __pyx_v_k);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_38setActiveColumns(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_l, int __pyx_v_k) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setActiveColumns", 0);

  /* "SLEPc/BV.pyx":371
 *             The active number of columns.
 *         """
 *         CHKERR( BVSetActiveColumns(self.bv, l, k) )             # <<<<<<<<<<<<<<
 * 
 *     def getActiveColumns(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetActiveColumns(__pyx_v_self->bv, __pyx_v_l, __pyx_v_k)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 371, __pyx_L1_error)

  /* "SLEPc/BV.pyx":360
 *         CHKERR( BVApplyMatrix(self.bv, x.vec, y.vec) )
 * 
 *     def setActiveColumns(self, int l, int k):             # <<<<<<<<<<<<<<
 *         """
 *         Specify the columns that will be involved in operations.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":373
 *         CHKERR( BVSetActiveColumns(self.bv, l, k) )
 * 
 *     def getActiveColumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current active dimensions.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_40getActiveColumns[] = "BV.getActiveColumns(self)\n\n        Returns the current active dimensions.\n\n        Returns\n        -------\n        l: int\n            The leading number of columns.\n        k: int\n            The active number of columns.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getActiveColumns (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getActiveColumns", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getActiveColumns", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_40getActiveColumns(struct PySlepcBVObject *__pyx_v_self) {
  PetscInt __pyx_v_l;
  PetscInt __pyx_v_k;
  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;
  __Pyx_RefNannySetupContext("getActiveColumns", 0);

  /* "SLEPc/BV.pyx":384
 *             The active number of columns.
 *         """
 *         cdef PetscInt l=0, k=0             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 *         return (toInt(l), toInt(k))
 */
  __pyx_v_l = 0;
  __pyx_v_k = 0;

  /* "SLEPc/BV.pyx":385
 *         """
 *         cdef PetscInt l=0, k=0
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )             # <<<<<<<<<<<<<<
 *         return (toInt(l), toInt(k))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_self->bv, (&__pyx_v_l), (&__pyx_v_k))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 385, __pyx_L1_error)

  /* "SLEPc/BV.pyx":386
 *         cdef PetscInt l=0, k=0
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 *         return (toInt(l), toInt(k))             # <<<<<<<<<<<<<<
 * 
 *     def scaleColumn(self, int j, alpha):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_l); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_k); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":373
 *         CHKERR( BVSetActiveColumns(self.bv, l, k) )
 * 
 *     def getActiveColumns(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current active dimensions.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getActiveColumns", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":388
 *         return (toInt(l), toInt(k))
 * 
 *     def scaleColumn(self, int j, alpha):             # <<<<<<<<<<<<<<
 *         """
 *         Scale column j by alpha
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_42scaleColumn[] = "BV.scaleColumn(self, int j, alpha)\n\n        Scale column j by alpha\n\n        Parameters\n        ----------\n        j: int\n            column number to be scaled.\n        alpha: float\n            scaling factor.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_j;
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scaleColumn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_alpha,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("scaleColumn", 1, 2, 2, 1); __PYX_ERR(3, 388, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scaleColumn") < 0)) __PYX_ERR(3, 388, __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_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 388, __pyx_L3_error)
    __pyx_v_alpha = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scaleColumn", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 388, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.scaleColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_alpha);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_42scaleColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_alpha) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("scaleColumn", 0);

  /* "SLEPc/BV.pyx":399
 *             scaling factor.
 *         """
 *         cdef PetscScalar sval = asScalar(alpha)             # <<<<<<<<<<<<<<
 *         CHKERR( BVScaleColumn(self.bv, j, sval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 399, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/BV.pyx":400
 *         """
 *         cdef PetscScalar sval = asScalar(alpha)
 *         CHKERR( BVScaleColumn(self.bv, j, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def scale(self, alpha):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVScaleColumn(__pyx_v_self->bv, __pyx_v_j, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 400, __pyx_L1_error)

  /* "SLEPc/BV.pyx":388
 *         return (toInt(l), toInt(k))
 * 
 *     def scaleColumn(self, int j, alpha):             # <<<<<<<<<<<<<<
 *         """
 *         Scale column j by alpha
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.scaleColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":402
 *         CHKERR( BVScaleColumn(self.bv, j, sval) )
 * 
 *     def scale(self, alpha):             # <<<<<<<<<<<<<<
 *         """
 *         Multiply the entries by a scalar value.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_45scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_44scale[] = "BV.scale(self, alpha)\n\n        Multiply the entries by a scalar value.\n\n        Parameters\n        ----------\n        alpha: float\n            scaling factor.\n\n        Notes\n        -----\n        All active columns (except the leading ones) are scaled.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_45scale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scale") < 0)) __PYX_ERR(3, 402, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_alpha = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scale", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 402, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_44scale(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_alpha);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_44scale(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("scale", 0);

  /* "SLEPc/BV.pyx":415
 *         All active columns (except the leading ones) are scaled.
 *         """
 *         cdef PetscScalar sval = asScalar(alpha)             # <<<<<<<<<<<<<<
 *         CHKERR( BVScale(self.bv, sval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 415, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/BV.pyx":416
 *         """
 *         cdef PetscScalar sval = asScalar(alpha)
 *         CHKERR( BVScale(self.bv, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def insertVec(self, int j, Vec w not None):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVScale(__pyx_v_self->bv, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 416, __pyx_L1_error)

  /* "SLEPc/BV.pyx":402
 *         CHKERR( BVScaleColumn(self.bv, j, sval) )
 * 
 *     def scale(self, alpha):             # <<<<<<<<<<<<<<
 *         """
 *         Multiply the entries by a scalar value.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":418
 *         CHKERR( BVScale(self.bv, sval) )
 * 
 *     def insertVec(self, int j, Vec w not None):             # <<<<<<<<<<<<<<
 *         """
 *         Insert a vector into the specified column.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_46insertVec[] = "BV.insertVec(self, int j, Vec w)\n\n        Insert a vector into the specified column.\n\n        Parameters\n        ----------\n        j: int\n            The column to be overwritten.\n        w: Vec\n            The vector to be copied.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_j;
  struct PyPetscVecObject *__pyx_v_w = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insertVec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_w,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insertVec", 1, 2, 2, 1); __PYX_ERR(3, 418, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVec") < 0)) __PYX_ERR(3, 418, __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_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 418, __pyx_L3_error)
    __pyx_v_w = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("insertVec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 418, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_w), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "w", 0))) __PYX_ERR(3, 418, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_w);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_46insertVec(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("insertVec", 0);

  /* "SLEPc/BV.pyx":429
 *             The vector to be copied.
 *         """
 *         CHKERR( BVInsertVec(self.bv, j, w.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def insertVecs(self, int s, W not None, bint orth):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVInsertVec(__pyx_v_self->bv, __pyx_v_j, __pyx_v_w->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 429, __pyx_L1_error)

  /* "SLEPc/BV.pyx":418
 *         CHKERR( BVScale(self.bv, sval) )
 * 
 *     def insertVec(self, int j, Vec w not None):             # <<<<<<<<<<<<<<
 *         """
 *         Insert a vector into the specified column.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":431
 *         CHKERR( BVInsertVec(self.bv, j, w.vec) )
 * 
 *     def insertVecs(self, int s, W not None, bint orth):             # <<<<<<<<<<<<<<
 *         """
 *         Insert a set of vectors into specified columns.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVecs[] = "BV.insertVecs(self, int s, W, bool orth)\n\n        Insert a set of vectors into specified columns.\n\n        Parameters\n        ----------\n        s: int\n            The first column to be overwritten.\n        W: Vec or sequence of Vec.\n            Set of vectors to be copied.\n        orth:\n            Flag indicating if the vectors must be orthogonalized.\n\n        Returns\n        -------\n        m: int\n            Number of linearly independent vectors.\n\n        Notes\n        -----\n        Copies the contents of vectors W into self(:,s:s+n), where n is the\n        length of W. If orthogonalization flag is set then the vectors are\n        copied one by one then orthogonalized against the previous one.  If any\n        are linearly dependent then it is discared and the value of m is\n        decreased.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_s;
  PyObject *__pyx_v_W = 0;
  int __pyx_v_orth;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insertVecs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_W,&__pyx_n_s_orth,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_W)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 1); __PYX_ERR(3, 431, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_orth)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, 2); __PYX_ERR(3, 431, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insertVecs") < 0)) __PYX_ERR(3, 431, __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_s = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_s == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 431, __pyx_L3_error)
    __pyx_v_W = values[1];
    __pyx_v_orth = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_orth == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 431, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("insertVecs", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 431, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVecs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_W) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "W"); __PYX_ERR(3, 431, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_s, __pyx_v_W, __pyx_v_orth);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_48insertVecs(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_s, PyObject *__pyx_v_W, int __pyx_v_orth) {
  Vec *__pyx_v_ws;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PetscInt __pyx_v_m;
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  PetscBool __pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("insertVecs", 0);
  __Pyx_INCREF(__pyx_v_W);

  /* "SLEPc/BV.pyx":457
 *         decreased.
 *         """
 *         if isinstance(W, Vec): W = [W]             # <<<<<<<<<<<<<<
 *         cdef PetscVec *ws = NULL
 *         cdef Py_ssize_t i = 0, ns = len(W)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_W, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_W);
    __Pyx_GIVEREF(__pyx_v_W);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_W);
    __Pyx_DECREF_SET(__pyx_v_W, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/BV.pyx":458
 *         """
 *         if isinstance(W, Vec): W = [W]
 *         cdef PetscVec *ws = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(W)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&ws)
 */
  __pyx_v_ws = NULL;

  /* "SLEPc/BV.pyx":459
 *         if isinstance(W, Vec): W = [W]
 *         cdef PetscVec *ws = NULL
 *         cdef Py_ssize_t i = 0, ns = len(W)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&ws)
 *         for i in range(ns): ws[i] = (<Vec?>W[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_W); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 459, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/BV.pyx":460
 *         cdef PetscVec *ws = NULL
 *         cdef Py_ssize_t i = 0, ns = len(W)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&ws)             # <<<<<<<<<<<<<<
 *         for i in range(ns): ws[i] = (<Vec?>W[i]).vec
 *         cdef PetscInt m = <PetscInt>ns
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_ws))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/BV.pyx":461
 *         cdef Py_ssize_t i = 0, ns = len(W)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&ws)
 *         for i in range(ns): ws[i] = (<Vec?>W[i]).vec             # <<<<<<<<<<<<<<
 *         cdef PetscInt m = <PetscInt>ns
 *         cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_W, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 461, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(3, 461, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_ws[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/BV.pyx":462
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&ws)
 *         for i in range(ns): ws[i] = (<Vec?>W[i]).vec
 *         cdef PetscInt m = <PetscInt>ns             # <<<<<<<<<<<<<<
 *         cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE
 *         CHKERR( BVInsertVecs(self.bv, <PetscInt>s, &m, ws, tval) )
 */
  __pyx_v_m = ((PetscInt)__pyx_v_ns);

  /* "SLEPc/BV.pyx":463
 *         for i in range(ns): ws[i] = (<Vec?>W[i]).vec
 *         cdef PetscInt m = <PetscInt>ns
 *         cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( BVInsertVecs(self.bv, <PetscInt>s, &m, ws, tval) )
 *         return toInt(m)
 */
  if ((__pyx_v_orth != 0)) {
    __pyx_t_7 = PETSC_TRUE;
  } else {
    __pyx_t_7 = PETSC_FALSE;
  }
  __pyx_v_tval = __pyx_t_7;

  /* "SLEPc/BV.pyx":464
 *         cdef PetscInt m = <PetscInt>ns
 *         cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE
 *         CHKERR( BVInsertVecs(self.bv, <PetscInt>s, &m, ws, tval) )             # <<<<<<<<<<<<<<
 *         return toInt(m)
 * 
 */
  __pyx_t_8 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVInsertVecs(__pyx_v_self->bv, ((PetscInt)__pyx_v_s), (&__pyx_v_m), __pyx_v_ws, __pyx_v_tval)); if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(3, 464, __pyx_L1_error)

  /* "SLEPc/BV.pyx":465
 *         cdef PetscBool tval = PETSC_TRUE if orth else PETSC_FALSE
 *         CHKERR( BVInsertVecs(self.bv, <PetscInt>s, &m, ws, tval) )
 *         return toInt(m)             # <<<<<<<<<<<<<<
 * 
 *     def dotVec(self, Vec v not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":431
 *         CHKERR( BVInsertVec(self.bv, j, w.vec) )
 * 
 *     def insertVecs(self, int s, W not None, bint orth):             # <<<<<<<<<<<<<<
 *         """
 *         Insert a set of vectors into specified columns.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.insertVecs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_W);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":467
 *         return toInt(m)
 * 
 *     def dotVec(self, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes multiple dot products of a vector against all the column
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_50dotVec[] = "BV.dotVec(self, Vec v)\n\n        Computes multiple dot products of a vector against all the column\n        vectors of a BV.\n\n        Parameters\n        ----------\n        v: Vec\n            A vector.\n\n        Returns\n        -------\n        m: Vec\n            A vector with the results.\n\n        This is analogue to VecMDot(), but using BV to represent a collection\n        of vectors. The result is m = X^H*y, so m_i is equal to x_j^H y. Note\n        that here X is transposed as opposed to BVDot().\n\n        If a non-standard inner product has been specified with BVSetMatrix(),\n        then the result is m = X^H*B*y.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_v = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dotVec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dotVec") < 0)) __PYX_ERR(3, 467, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_v = ((struct PyPetscVecObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dotVec", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 467, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.dotVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 467, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_50dotVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v) {
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_k = NULL;
  PetscScalar *__pyx_v_mval;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  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)(PyObject *);
  size_t __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  __Pyx_RefNannySetupContext("dotVec", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_v);

  /* "SLEPc/BV.pyx":489
 *         then the result is m = X^H*B*y.
 *         """
 *         l, k = self.getActiveColumns()             # <<<<<<<<<<<<<<
 *         cdef PetscScalar* mval = NULL
 *         cdef tmp = allocate(<size_t>(k - l)*sizeof(PetscScalar),<void**>&mval)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getActiveColumns); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(3, 489, __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(3, 489, __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;
    #if CYTHON_COMPILING_IN_CPYTHON
    Py_ssize_t size = Py_SIZE(sequence);
    #else
    Py_ssize_t size = PySequence_Size(sequence);
    #endif
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(3, 489, __pyx_L1_error)
    }
    #if CYTHON_COMPILING_IN_CPYTHON
    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(3, 489, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 489, __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(3, 489, __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(3, 489, __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(3, 489, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_l = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/BV.pyx":490
 *         """
 *         l, k = self.getActiveColumns()
 *         cdef PetscScalar* mval = NULL             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>(k - l)*sizeof(PetscScalar),<void**>&mval)
 * 
 */
  __pyx_v_mval = NULL;

  /* "SLEPc/BV.pyx":491
 *         l, k = self.getActiveColumns()
 *         cdef PetscScalar* mval = NULL
 *         cdef tmp = allocate(<size_t>(k - l)*sizeof(PetscScalar),<void**>&mval)             # <<<<<<<<<<<<<<
 * 
 *         CHKERR( BVDotVec(self.bv, v.vec, mval) )
 */
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 491, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_t_6) * (sizeof(PetscScalar))), ((void **)(&__pyx_v_mval))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":493
 *         cdef tmp = allocate(<size_t>(k - l)*sizeof(PetscScalar),<void**>&mval)
 * 
 *         CHKERR( BVDotVec(self.bv, v.vec, mval) )             # <<<<<<<<<<<<<<
 * 
 *         v = Vec().create(COMM_SELF)
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDotVec(__pyx_v_self->bv, __pyx_v_v->vec, __pyx_v_mval)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(3, 493, __pyx_L1_error)

  /* "SLEPc/BV.pyx":495
 *         CHKERR( BVDotVec(self.bv, v.vec, mval) )
 * 
 *         v = Vec().create(COMM_SELF)             # <<<<<<<<<<<<<<
 *         v.setType('seq')
 *         v.setSizes((DECIDE,k-l))
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_create); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 495, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 495, __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_3);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 495, __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 (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Vec))))) __PYX_ERR(3, 495, __pyx_L1_error)
  __Pyx_DECREF_SET(__pyx_v_v, ((struct PyPetscVecObject *)__pyx_t_1));
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":496
 * 
 *         v = Vec().create(COMM_SELF)
 *         v.setType('seq')             # <<<<<<<<<<<<<<
 *         v.setSizes((DECIDE,k-l))
 *         v.setArray([mval[i] for i in range(0, k - l)])
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setType); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":497
 *         v = Vec().create(COMM_SELF)
 *         v.setType('seq')
 *         v.setSizes((DECIDE,k-l))             # <<<<<<<<<<<<<<
 *         v.setArray([mval[i] for i in range(0, k - l)])
 *         v.ghostUpdate()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setSizes); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_DECIDE); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_8 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 497, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 497, __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_4);
    PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 497, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":498
 *         v.setType('seq')
 *         v.setSizes((DECIDE,k-l))
 *         v.setArray([mval[i] for i in range(0, k - l)])             # <<<<<<<<<<<<<<
 *         v.ghostUpdate()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_setArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = PyNumber_Subtract(__pyx_v_k, __pyx_v_l); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 498, __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_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  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_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 498, __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(3, 498, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 498, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(3, 498, __pyx_L1_error)
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_10(__pyx_t_3);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(3, 498, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 498, __pyx_L1_error)
    __pyx_t_4 = PyFloat_FromDouble((__pyx_v_mval[__pyx_t_11])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 498, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 498, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 498, __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_8);
    PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 498, __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_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":499
 *         v.setSizes((DECIDE,k-l))
 *         v.setArray([mval[i] for i in range(0, k - l)])
 *         v.ghostUpdate()             # <<<<<<<<<<<<<<
 * 
 *         return v
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_v), __pyx_n_s_ghostUpdate); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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);
    }
  }
  if (__pyx_t_4) {
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 499, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 499, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":501
 *         v.ghostUpdate()
 * 
 *         return v             # <<<<<<<<<<<<<<
 * 
 *     def getColumn(self, int j):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_v));
  __pyx_r = ((PyObject *)__pyx_v_v);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":467
 *         return toInt(m)
 * 
 *     def dotVec(self, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes multiple dot products of a vector against all the column
 */

  /* 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("slepc4py.SLEPc.BV.dotVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":503
 *         return v
 * 
 *     def getColumn(self, int j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Vec object that contains the entries of the requested column
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_52getColumn[] = "BV.getColumn(self, int j)\n\n        Returns a Vec object that contains the entries of the requested column\n        of the basis vectors object.\n\n        Parameters\n        ----------\n        j: int\n            The index of the requested column.\n\n        Returns\n        -------\n        v: Vec\n            The vector containing the jth column.\n\n        Notes\n        -----\n        Modifying the returned Vec will change the BV entries as well.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_j;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getColumn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getColumn") < 0)) __PYX_ERR(3, 503, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 503, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getColumn", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 503, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_52getColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j) {
  struct PyPetscVecObject *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getColumn", 0);

  /* "SLEPc/BV.pyx":522
 *         Modifying the returned Vec will change the BV entries as well.
 *         """
 *         cdef Vec v = Vec()             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetColumn(self.bv, j, &v.vec) )
 *         return v
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = ((struct PyPetscVecObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/BV.pyx":523
 *         """
 *         cdef Vec v = Vec()
 *         CHKERR( BVGetColumn(self.bv, j, &v.vec) )             # <<<<<<<<<<<<<<
 *         return v
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetColumn(__pyx_v_self->bv, __pyx_v_j, (&__pyx_v_v->vec))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(3, 523, __pyx_L1_error)

  /* "SLEPc/BV.pyx":524
 *         cdef Vec v = Vec()
 *         CHKERR( BVGetColumn(self.bv, j, &v.vec) )
 *         return v             # <<<<<<<<<<<<<<
 * 
 *     def restoreColumn(self, int j, Vec v not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_v));
  __pyx_r = ((PyObject *)__pyx_v_v);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":503
 *         return v
 * 
 *     def getColumn(self, int j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Vec object that contains the entries of the requested column
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.getColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":526
 *         return v
 * 
 *     def restoreColumn(self, int j, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Restore a column obtained with BVGetColumn().
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_54restoreColumn[] = "BV.restoreColumn(self, int j, Vec v)\n\n        Restore a column obtained with BVGetColumn().\n\n        Parameters\n        ----------\n        j: int\n            The index of the requested column.\n\n        v: Vec\n            The vector obtained with BVGetColumn().\n\n        Notes\n        -----\n        The arguments must match the corresponding call to BVGetColumn().\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_j;
  struct PyPetscVecObject *__pyx_v_v = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("restoreColumn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_v,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("restoreColumn", 1, 2, 2, 1); __PYX_ERR(3, 526, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "restoreColumn") < 0)) __PYX_ERR(3, 526, __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_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 526, __pyx_L3_error)
    __pyx_v_v = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("restoreColumn", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 526, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.restoreColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 526, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_54restoreColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, struct PyPetscVecObject *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("restoreColumn", 0);

  /* "SLEPc/BV.pyx":542
 *         The arguments must match the corresponding call to BVGetColumn().
 *         """
 *         CHKERR( BVRestoreColumn(self.bv, j, &v.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def dot(self, BV Y not None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVRestoreColumn(__pyx_v_self->bv, __pyx_v_j, (&__pyx_v_v->vec))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 542, __pyx_L1_error)

  /* "SLEPc/BV.pyx":526
 *         return v
 * 
 *     def restoreColumn(self, int j, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Restore a column obtained with BVGetColumn().
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.restoreColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":544
 *         CHKERR( BVRestoreColumn(self.bv, j, &v.vec) )
 * 
 *     def dot(self, BV Y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the 'block-dot' product of two basis vectors objects.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_57dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_56dot[] = "BV.dot(self, BV Y)\n\n        Computes the 'block-dot' product of two basis vectors objects.\n            M = Y^H*X (m_ij = y_i^H x_j) or M = Y^H*B*X\n\n        Parameters\n        ----------\n        Y: BV\n            Left basis vectors, can be the same as self, giving M = X^H X.\n\n        Returns\n        -------\n        M: Mat\n            The resulting matrix.\n\n        Notes\n        -----\n        This is the generalization of VecDot() for a collection of vectors, M =\n        Y^H*X. The result is a matrix M whose entry m_ij is equal to y_i^H x_j\n        (where y_i^H denotes the conjugate transpose of y_i).\n\n        X and Y can be the same object.\n\n        If a non-standard inner product has been specified with setMatrix(),\n        then the result is M = Y^H*B*X. In this case, both X and Y must have\n        the same associated matrix.\n\n        Only rows (resp. columns) of M starting from ly (resp. lx) are\n        computed, where ly (resp. lx) is the number of leading columns of Y\n        (resp. X).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_57dot(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_Y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Y,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dot") < 0)) __PYX_ERR(3, 544, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_Y = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dot", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 544, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "Y", 0))) __PYX_ERR(3, 544, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_56dot(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_Y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_56dot(struct PySlepcBVObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_Y) {
  struct PySlepcBVObject *__pyx_v_X = 0;
  PetscInt __pyx_v_ky;
  PetscInt __pyx_v_kx;
  struct PyPetscMatObject *__pyx_v_M = 0;
  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;
  __Pyx_RefNannySetupContext("dot", 0);

  /* "SLEPc/BV.pyx":575
 *         (resp. X).
 *         """
 *         cdef BV X = self             # <<<<<<<<<<<<<<
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_v_X = __pyx_v_self;

  /* "SLEPc/BV.pyx":576
 *         """
 *         cdef BV X = self
 *         cdef PetscInt ky=0, kx=0             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 */
  __pyx_v_ky = 0;
  __pyx_v_kx = 0;

  /* "SLEPc/BV.pyx":577
 *         cdef BV X = self
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_Y->bv, NULL, (&__pyx_v_ky))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 577, __pyx_L1_error)

  /* "SLEPc/BV.pyx":578
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )             # <<<<<<<<<<<<<<
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         CHKERR( BVDot(X.bv, Y.bv, M.mat) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_X->bv, NULL, (&__pyx_v_kx))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 578, __pyx_L1_error)

  /* "SLEPc/BV.pyx":579
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()             # <<<<<<<<<<<<<<
 *         CHKERR( BVDot(X.bv, Y.bv, M.mat) )
 *         return M
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_createDense); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_PetscInt(__pyx_v_ky); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_PetscInt(__pyx_v_kx); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 579, __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 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_comm, __pyx_t_3) < 0) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 579, __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_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setUp); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8petsc4py_5PETSc_Mat))))) __PYX_ERR(3, 579, __pyx_L1_error)
  __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":580
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         CHKERR( BVDot(X.bv, Y.bv, M.mat) )             # <<<<<<<<<<<<<<
 *         return M
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVDot(__pyx_v_X->bv, __pyx_v_Y->bv, __pyx_v_M->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 580, __pyx_L1_error)

  /* "SLEPc/BV.pyx":581
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         CHKERR( BVDot(X.bv, Y.bv, M.mat) )
 *         return M             # <<<<<<<<<<<<<<
 * 
 *     def matProject(self, Mat A, BV Y not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_M));
  __pyx_r = ((PyObject *)__pyx_v_M);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":544
 *         CHKERR( BVRestoreColumn(self.bv, j, &v.vec) )
 * 
 *     def dot(self, BV Y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the 'block-dot' product of two basis vectors objects.
 */

  /* 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("slepc4py.SLEPc.BV.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":583
 *         return M
 * 
 *     def matProject(self, Mat A, BV Y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the projection of a matrix onto a subspace.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_58matProject[] = "BV.matProject(self, Mat A, BV Y)\n\n        Computes the projection of a matrix onto a subspace.\n\n        M = Y^H A X\n\n        Parameters\n        ----------\n        A: Mat or None\n            Matrix to be projected.\n\n        Y: BV\n            Left basis vectors, can be the same as self, giving M = X^H A X.\n\n        Returns\n        -------\n        M: Mat\n            Projection of the matrix A onto the subspace.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PySlepcBVObject *__pyx_v_Y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matProject (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("matProject", 1, 2, 2, 1); __PYX_ERR(3, 583, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matProject") < 0)) __PYX_ERR(3, 583, __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_A = ((struct PyPetscMatObject *)values[0]);
    __pyx_v_Y = ((struct PySlepcBVObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("matProject", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 583, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.matProject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "A", 0))) __PYX_ERR(3, 583, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "Y", 0))) __PYX_ERR(3, 583, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_58matProject(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) {
  struct PySlepcBVObject *__pyx_v_X = 0;
  PetscInt __pyx_v_ky;
  PetscInt __pyx_v_kx;
  struct PyPetscMatObject *__pyx_v_M = 0;
  Mat __pyx_v_Amat;
  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;
  void *__pyx_t_7;
  int __pyx_t_8;
  __Pyx_RefNannySetupContext("matProject", 0);

  /* "SLEPc/BV.pyx":602
 *             Projection of the matrix A onto the subspace.
 *         """
 *         cdef BV X = self             # <<<<<<<<<<<<<<
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_v_X = __pyx_v_self;

  /* "SLEPc/BV.pyx":603
 *         """
 *         cdef BV X = self
 *         cdef PetscInt ky=0, kx=0             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 */
  __pyx_v_ky = 0;
  __pyx_v_kx = 0;

  /* "SLEPc/BV.pyx":604
 *         cdef BV X = self
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_Y->bv, NULL, (&__pyx_v_ky))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 604, __pyx_L1_error)

  /* "SLEPc/BV.pyx":605
 *         cdef PetscInt ky=0, kx=0
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )             # <<<<<<<<<<<<<<
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         cdef PetscMat Amat = NULL if A is None else A.mat
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_X->bv, NULL, (&__pyx_v_kx))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 605, __pyx_L1_error)

  /* "SLEPc/BV.pyx":606
 *         CHKERR( BVGetActiveColumns(Y.bv, NULL, &ky) )
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()             # <<<<<<<<<<<<<<
 *         cdef PetscMat Amat = NULL if A is None else A.mat
 *         CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) )
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_createDense); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyInt_From_PetscInt(__pyx_v_ky); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_From_PetscInt(__pyx_v_kx); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 606, __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 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_comm, __pyx_t_3) < 0) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 606, __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_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_setUp); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 606, __pyx_L1_error)
  }
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_8petsc4py_5PETSc_Mat))))) __PYX_ERR(3, 606, __pyx_L1_error)
  __pyx_v_M = ((struct PyPetscMatObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":607
 *         CHKERR( BVGetActiveColumns(X.bv, NULL, &kx) )
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         cdef PetscMat Amat = NULL if A is None else A.mat             # <<<<<<<<<<<<<<
 *         CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) )
 *         return M
 */
  __pyx_t_8 = (((PyObject *)__pyx_v_A) == Py_None);
  if ((__pyx_t_8 != 0)) {
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_7 = __pyx_v_A->mat;
  }
  __pyx_v_Amat = __pyx_t_7;

  /* "SLEPc/BV.pyx":608
 *         cdef Mat M = Mat().createDense((ky, kx), comm=COMM_SELF).setUp()
 *         cdef PetscMat Amat = NULL if A is None else A.mat
 *         CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) )             # <<<<<<<<<<<<<<
 *         return M
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatProject(__pyx_v_X->bv, __pyx_v_Amat, __pyx_v_Y->bv, __pyx_v_M->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 608, __pyx_L1_error)

  /* "SLEPc/BV.pyx":609
 *         cdef PetscMat Amat = NULL if A is None else A.mat
 *         CHKERR( BVMatProject(X.bv, Amat, Y.bv, M.mat) )
 *         return M             # <<<<<<<<<<<<<<
 * 
 *     def matMult(self, Mat A not None, BV Y=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_M));
  __pyx_r = ((PyObject *)__pyx_v_M);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":583
 *         return M
 * 
 *     def matProject(self, Mat A, BV Y not None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the projection of a matrix onto a subspace.
 */

  /* 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("slepc4py.SLEPc.BV.matProject", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_X);
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":611
 *         return M
 * 
 *     def matMult(self, Mat A not None, BV Y=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix-vector product for each column, Y = A*V.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_60matMult[] = "BV.matMult(self, Mat A, BV Y=None)\n\n        Computes the matrix-vector product for each column, Y = A*V.\n\n        Parameters\n        ----------\n        A: Mat\n            The matrix.\n\n        Returns\n        -------\n        Y: BV\n            The result.\n\n        Notes\n        -----\n        Only active columns (excluding the leading ones) are processed.\n\n        It is possible to choose whether the computation is done column by column\n        or using dense matrices using the options database keys:\n\n            -bv_matmult_vecs\n            -bv_matmult_mat\n\n        The default is bv_matmult_mat.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PySlepcBVObject *__pyx_v_Y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matMult (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_Y,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((struct PySlepcBVObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matMult") < 0)) __PYX_ERR(3, 611, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_A = ((struct PyPetscMatObject *)values[0]);
    __pyx_v_Y = ((struct PySlepcBVObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("matMult", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 611, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMult", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(3, 611, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(3, 611, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_60matMult(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) {
  MPI_Comm __pyx_v_comm;
  const char* __pyx_v_bv_type;
  PetscInt __pyx_v_n;
  PetscInt __pyx_v_N;
  PetscInt __pyx_v_m;
  BVOrthogType __pyx_v_val1;
  BVOrthogRefineType __pyx_v_val2;
  BVOrthogBlockType __pyx_v_val3;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("matMult", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_Y);

  /* "SLEPc/BV.pyx":637
 *         The default is bv_matmult_mat.
 *         """
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)             # <<<<<<<<<<<<<<
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0
 */
  __pyx_v_comm = PetscObjectComm(((PetscObject)__pyx_v_self->bv));

  /* "SLEPc/BV.pyx":638
 *         """
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)
 *         cdef SlepcBVType bv_type = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 */
  __pyx_v_bv_type = NULL;

  /* "SLEPc/BV.pyx":639
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 */
  __pyx_v_n = 0;
  __pyx_v_N = 0;
  __pyx_v_m = 0;

  /* "SLEPc/BV.pyx":640
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 */
  __pyx_v_val1 = BV_ORTHOG_CGS;

  /* "SLEPc/BV.pyx":641
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 */
  __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED;

  /* "SLEPc/BV.pyx":642
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 */
  __pyx_v_val3 = BV_ORTHOG_BLOCK_GS;

  /* "SLEPc/BV.pyx":643
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/BV.pyx":644
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()             # <<<<<<<<<<<<<<
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Y) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_Y, ((struct PySlepcBVObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }

  /* "SLEPc/BV.pyx":645
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 */
  __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":646
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )             # <<<<<<<<<<<<<<
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 646, __pyx_L1_error)

    /* "SLEPc/BV.pyx":647
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )             # <<<<<<<<<<<<<<
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetLocalSize(__pyx_v_A->mat, (&__pyx_v_n), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 647, __pyx_L1_error)

    /* "SLEPc/BV.pyx":648
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetSize(__pyx_v_A->mat, (&__pyx_v_N), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 648, __pyx_L1_error)

    /* "SLEPc/BV.pyx":649
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, NULL, NULL, (&__pyx_v_m))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 649, __pyx_L1_error)

    /* "SLEPc/BV.pyx":650
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )             # <<<<<<<<<<<<<<
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 650, __pyx_L1_error)

    /* "SLEPc/BV.pyx":645
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 */
  }

  /* "SLEPc/BV.pyx":651
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 */
  __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":652
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_comm, (&__pyx_v_Y->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 652, __pyx_L1_error)

    /* "SLEPc/BV.pyx":653
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_Y->bv, __pyx_v_bv_type)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 653, __pyx_L1_error)

    /* "SLEPc/BV.pyx":654
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMult(self.bv, A.mat, Y.bv) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_Y->bv, __pyx_v_n, __pyx_v_N, __pyx_v_m)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 654, __pyx_L1_error)

    /* "SLEPc/BV.pyx":655
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )             # <<<<<<<<<<<<<<
 *         CHKERR( BVMatMult(self.bv, A.mat, Y.bv) )
 *         return Y
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_Y->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 655, __pyx_L1_error)

    /* "SLEPc/BV.pyx":651
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 */
  }

  /* "SLEPc/BV.pyx":656
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMult(self.bv, A.mat, Y.bv) )             # <<<<<<<<<<<<<<
 *         return Y
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatMult(__pyx_v_self->bv, __pyx_v_A->mat, __pyx_v_Y->bv)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 656, __pyx_L1_error)

  /* "SLEPc/BV.pyx":657
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMult(self.bv, A.mat, Y.bv) )
 *         return Y             # <<<<<<<<<<<<<<
 * 
 *     def matMultHermitianTranspose(self, Mat A not None, BV Y=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_Y));
  __pyx_r = ((PyObject *)__pyx_v_Y);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":611
 *         return M
 * 
 *     def matMult(self, Mat A not None, BV Y=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix-vector product for each column, Y = A*V.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMult", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":659
 *         return Y
 * 
 *     def matMultHermitianTranspose(self, Mat A not None, BV Y=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix-vector product with the conjugate transpose of a
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose[] = "BV.matMultHermitianTranspose(self, Mat A, BV Y=None)\n\n        Computes the matrix-vector product with the conjugate transpose of a\n        matrix for each column, Y=A^H*V.\n\n        Parameters\n        ----------\n        A: Mat\n            The matrix.\n\n        Returns\n        -------\n        Y: BV\n            The result.\n\n        Notes\n        -----\n        Only active columns (excluding the leading ones) are processed.\n\n        As opoosed to matMult(), this operation is always done by column by\n        column, with a sequence of calls to MatMultHermitianTranspose().\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PySlepcBVObject *__pyx_v_Y = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("matMultHermitianTranspose (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_Y,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((struct PySlepcBVObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Y);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "matMultHermitianTranspose") < 0)) __PYX_ERR(3, 659, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_A = ((struct PyPetscMatObject *)values[0]);
    __pyx_v_Y = ((struct PySlepcBVObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("matMultHermitianTranspose", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 659, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMultHermitianTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(3, 659, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Y), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "Y", 0))) __PYX_ERR(3, 659, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_A, __pyx_v_Y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PySlepcBVObject *__pyx_v_Y) {
  MPI_Comm __pyx_v_comm;
  const char* __pyx_v_bv_type;
  PetscInt __pyx_v_n;
  PetscInt __pyx_v_N;
  PetscInt __pyx_v_m;
  BVOrthogType __pyx_v_val1;
  BVOrthogRefineType __pyx_v_val2;
  BVOrthogBlockType __pyx_v_val3;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("matMultHermitianTranspose", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_Y);

  /* "SLEPc/BV.pyx":681
 *         column, with a sequence of calls to MatMultHermitianTranspose().
 *         """
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)             # <<<<<<<<<<<<<<
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0
 */
  __pyx_v_comm = PetscObjectComm(((PetscObject)__pyx_v_self->bv));

  /* "SLEPc/BV.pyx":682
 *         """
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)
 *         cdef SlepcBVType bv_type = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 */
  __pyx_v_bv_type = NULL;

  /* "SLEPc/BV.pyx":683
 *         cdef MPI_Comm comm = PetscObjectComm(<PetscObject>self.bv)
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 */
  __pyx_v_n = 0;
  __pyx_v_N = 0;
  __pyx_v_m = 0;

  /* "SLEPc/BV.pyx":684
 *         cdef SlepcBVType bv_type = NULL
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 */
  __pyx_v_val1 = BV_ORTHOG_CGS;

  /* "SLEPc/BV.pyx":685
 *         cdef PetscInt n=0, N=0, m=0
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED             # <<<<<<<<<<<<<<
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 */
  __pyx_v_val2 = BV_ORTHOG_REFINE_IFNEEDED;

  /* "SLEPc/BV.pyx":686
 *         cdef SlepcBVOrthogType val1 = BV_ORTHOG_CGS
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 */
  __pyx_v_val3 = BV_ORTHOG_BLOCK_GS;

  /* "SLEPc/BV.pyx":687
 *         cdef SlepcBVOrthogRefineType val2 = BV_ORTHOG_REFINE_IFNEEDED
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/BV.pyx":688
 *         cdef SlepcBVOrthogBlockType val3 = BV_ORTHOG_BLOCK_GS
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()             # <<<<<<<<<<<<<<
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Y) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_Y, ((struct PySlepcBVObject *)__pyx_t_3));
    __pyx_t_3 = 0;
  }

  /* "SLEPc/BV.pyx":689
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 */
  __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":690
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )             # <<<<<<<<<<<<<<
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetType(__pyx_v_self->bv, (&__pyx_v_bv_type))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 690, __pyx_L1_error)

    /* "SLEPc/BV.pyx":691
 *         if Y.bv == NULL:
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )             # <<<<<<<<<<<<<<
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetLocalSize(__pyx_v_A->mat, (&__pyx_v_n), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 691, __pyx_L1_error)

    /* "SLEPc/BV.pyx":692
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatGetSize(__pyx_v_A->mat, (&__pyx_v_N), NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 692, __pyx_L1_error)

    /* "SLEPc/BV.pyx":693
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetSizes(__pyx_v_self->bv, NULL, NULL, (&__pyx_v_m))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 693, __pyx_L1_error)

    /* "SLEPc/BV.pyx":694
 *             CHKERR( MatGetSize(A.mat, &N, NULL) )
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )             # <<<<<<<<<<<<<<
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetOrthogonalization(__pyx_v_self->bv, (&__pyx_v_val1), (&__pyx_v_val2), (&__pyx_v_rval), (&__pyx_v_val3))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 694, __pyx_L1_error)

    /* "SLEPc/BV.pyx":689
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if Y is None: Y = BV()
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVGetType(self.bv, &bv_type) )
 *             CHKERR( MatGetLocalSize(A.mat, &n, NULL) )
 */
  }

  /* "SLEPc/BV.pyx":695
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 */
  __pyx_t_2 = ((__pyx_v_Y->bv == NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/BV.pyx":696
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVCreate(__pyx_v_comm, (&__pyx_v_Y->bv))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 696, __pyx_L1_error)

    /* "SLEPc/BV.pyx":697
 *         if Y.bv == NULL:
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetType(__pyx_v_Y->bv, __pyx_v_bv_type)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 697, __pyx_L1_error)

    /* "SLEPc/BV.pyx":698
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )             # <<<<<<<<<<<<<<
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) )
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetSizes(__pyx_v_Y->bv, __pyx_v_n, __pyx_v_N, __pyx_v_m)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 698, __pyx_L1_error)

    /* "SLEPc/BV.pyx":699
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )             # <<<<<<<<<<<<<<
 *         CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) )
 *         return Y
 */
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetOrthogonalization(__pyx_v_Y->bv, __pyx_v_val1, __pyx_v_val2, __pyx_v_rval, __pyx_v_val3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 699, __pyx_L1_error)

    /* "SLEPc/BV.pyx":695
 *             CHKERR( BVGetSizes(self.bv, NULL, NULL, &m) )
 *             CHKERR( BVGetOrthogonalization(self.bv, &val1, &val2, &rval, &val3) )
 *         if Y.bv == NULL:             # <<<<<<<<<<<<<<
 *             CHKERR( BVCreate(comm, &Y.bv) )
 *             CHKERR( BVSetType(Y.bv, bv_type) )
 */
  }

  /* "SLEPc/BV.pyx":700
 *             CHKERR( BVSetSizes(Y.bv, n, N, m) )
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) )             # <<<<<<<<<<<<<<
 *         return Y
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMatMultHermitianTranspose(__pyx_v_self->bv, __pyx_v_A->mat, __pyx_v_Y->bv)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 700, __pyx_L1_error)

  /* "SLEPc/BV.pyx":701
 *             CHKERR( BVSetOrthogonalization(Y.bv, val1, val2, rval, val3) )
 *         CHKERR( BVMatMultHermitianTranspose(self.bv, A.mat, Y.bv) )
 *         return Y             # <<<<<<<<<<<<<<
 * 
 *     def multVec(self, alpha, beta, Vec y not None, q):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_Y));
  __pyx_r = ((PyObject *)__pyx_v_Y);
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":659
 *         return Y
 * 
 *     def matMultHermitianTranspose(self, Mat A not None, BV Y=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix-vector product with the conjugate transpose of a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.matMultHermitianTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_Y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":703
 *         return Y
 * 
 *     def multVec(self, alpha, beta, Vec y not None, q):             # <<<<<<<<<<<<<<
 *         """
 *         Computes y = beta*y + alpha*X*q.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_64multVec[] = "BV.multVec(self, alpha, beta, Vec y, q)\n\n        Computes y = beta*y + alpha*X*q.\n\n        Parameter\n        ---------\n        alpha: scalar\n        beta: scalar\n        q: scalar or sequence of scalars\n\n        Return\n        ------\n        y: Vec\n            The result.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_v_beta = 0;
  struct PyPetscVecObject *__pyx_v_y = 0;
  PyObject *__pyx_v_q = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("multVec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,&__pyx_n_s_beta,&__pyx_n_s_y,&__pyx_n_s_q,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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 1); __PYX_ERR(3, 703, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 2); __PYX_ERR(3, 703, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, 3); __PYX_ERR(3, 703, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "multVec") < 0)) __PYX_ERR(3, 703, __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_alpha = values[0];
    __pyx_v_beta = values[1];
    __pyx_v_y = ((struct PyPetscVecObject *)values[2]);
    __pyx_v_q = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multVec", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 703, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.multVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "y", 0))) __PYX_ERR(3, 703, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_alpha, __pyx_v_beta, __pyx_v_y, __pyx_v_q);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_64multVec(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta, struct PyPetscVecObject *__pyx_v_y, PyObject *__pyx_v_q) {
  PetscScalar __pyx_v_sval1;
  PetscScalar __pyx_v_sval2;
  PetscInt __pyx_v_nq;
  PetscScalar *__pyx_v_qval;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PetscInt __pyx_v_l;
  PetscInt __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("multVec", 0);

  /* "SLEPc/BV.pyx":718
 *             The result.
 *         """
 *         cdef PetscScalar sval1 = asScalar(alpha)             # <<<<<<<<<<<<<<
 *         cdef PetscScalar sval2 = asScalar(beta)
 *         cdef PetscInt nq = 0
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 718, __pyx_L1_error)
  __pyx_v_sval1 = __pyx_t_1;

  /* "SLEPc/BV.pyx":719
 *         """
 *         cdef PetscScalar sval1 = asScalar(alpha)
 *         cdef PetscScalar sval2 = asScalar(beta)             # <<<<<<<<<<<<<<
 *         cdef PetscInt nq = 0
 *         cdef PetscScalar* qval = NULL
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_beta); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 719, __pyx_L1_error)
  __pyx_v_sval2 = __pyx_t_1;

  /* "SLEPc/BV.pyx":720
 *         cdef PetscScalar sval1 = asScalar(alpha)
 *         cdef PetscScalar sval2 = asScalar(beta)
 *         cdef PetscInt nq = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar* qval = NULL
 *         cdef tmp = iarray_s(q, &nq, &qval)
 */
  __pyx_v_nq = 0;

  /* "SLEPc/BV.pyx":721
 *         cdef PetscScalar sval2 = asScalar(beta)
 *         cdef PetscInt nq = 0
 *         cdef PetscScalar* qval = NULL             # <<<<<<<<<<<<<<
 *         cdef tmp = iarray_s(q, &nq, &qval)
 *         cdef PetscInt l=0, k=0
 */
  __pyx_v_qval = NULL;

  /* "SLEPc/BV.pyx":722
 *         cdef PetscInt nq = 0
 *         cdef PetscScalar* qval = NULL
 *         cdef tmp = iarray_s(q, &nq, &qval)             # <<<<<<<<<<<<<<
 *         cdef PetscInt l=0, k=0
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_q, (&__pyx_v_nq), (&__pyx_v_qval)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tmp = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "SLEPc/BV.pyx":723
 *         cdef PetscScalar* qval = NULL
 *         cdef tmp = iarray_s(q, &nq, &qval)
 *         cdef PetscInt l=0, k=0             # <<<<<<<<<<<<<<
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 *         assert nq == k-l
 */
  __pyx_v_l = 0;
  __pyx_v_k = 0;

  /* "SLEPc/BV.pyx":724
 *         cdef tmp = iarray_s(q, &nq, &qval)
 *         cdef PetscInt l=0, k=0
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )             # <<<<<<<<<<<<<<
 *         assert nq == k-l
 *         CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVGetActiveColumns(__pyx_v_self->bv, (&__pyx_v_l), (&__pyx_v_k))); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(3, 724, __pyx_L1_error)

  /* "SLEPc/BV.pyx":725
 *         cdef PetscInt l=0, k=0
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 *         assert nq == k-l             # <<<<<<<<<<<<<<
 *         CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) )
 * 
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_nq == (__pyx_v_k - __pyx_v_l)) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(3, 725, __pyx_L1_error)
    }
  }
  #endif

  /* "SLEPc/BV.pyx":726
 *         CHKERR( BVGetActiveColumns(self.bv, &l, &k) )
 *         assert nq == k-l
 *         CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) )             # <<<<<<<<<<<<<<
 * 
 *     def normColumn(self, int j, norm_type=None):
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVMultVec(__pyx_v_self->bv, __pyx_v_sval1, __pyx_v_sval2, __pyx_v_y->vec, __pyx_v_qval)); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(3, 726, __pyx_L1_error)

  /* "SLEPc/BV.pyx":703
 *         return Y
 * 
 *     def multVec(self, alpha, beta, Vec y not None, q):             # <<<<<<<<<<<<<<
 *         """
 *         Computes y = beta*y + alpha*X*q.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.multVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":728
 *         CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) )
 * 
 *     def normColumn(self, int j, norm_type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix norm of the BV.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_66normColumn[] = "BV.normColumn(self, int j, norm_type=None)\n\n        Computes the matrix norm of the BV.\n\n        Parameters\n        ----------\n        j: int\n            Index of column.\n        norm_type: PETSc.NormType (int)\n            The norm type.\n\n        Returns\n        -------\n        norm: float\n\n        Notes\n        -----\n        The norm of V[j] is computed (NORM_1, NORM_2, or NORM_INFINITY).\n\n        If a non-standard inner product has been specified with BVSetMatrix(),\n        then the returned value is ``sqrt(V[j]'* B*V[j])``, where B is the inner\n        product matrix (argument 'type' is ignored).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_j;
  PyObject *__pyx_v_norm_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normColumn (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_j,&__pyx_n_s_norm_type,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_norm_type);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "normColumn") < 0)) __PYX_ERR(3, 728, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_j = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 728, __pyx_L3_error)
    __pyx_v_norm_type = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("normColumn", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 728, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.normColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_j, __pyx_v_norm_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_66normColumn(struct PySlepcBVObject *__pyx_v_self, int __pyx_v_j, PyObject *__pyx_v_norm_type) {
  NormType __pyx_v_ntype;
  PetscReal __pyx_v_norm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  NormType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("normColumn", 0);

  /* "SLEPc/BV.pyx":751
 *         product matrix (argument 'type' is ignored).
 *         """
 *         cdef PetscNormType ntype = PETSC_NORM_2             # <<<<<<<<<<<<<<
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0
 */
  __pyx_v_ntype = NORM_2;

  /* "SLEPc/BV.pyx":752
 *         """
 *         cdef PetscNormType ntype = PETSC_NORM_2
 *         if norm_type is not None: ntype = norm_type             # <<<<<<<<<<<<<<
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNormColumn(self.bv, j, ntype, &norm) )
 */
  __pyx_t_1 = (__pyx_v_norm_type != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((NormType)__Pyx_PyInt_As_NormType(__pyx_v_norm_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 752, __pyx_L1_error)
    __pyx_v_ntype = __pyx_t_3;
  }

  /* "SLEPc/BV.pyx":753
 *         cdef PetscNormType ntype = PETSC_NORM_2
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0             # <<<<<<<<<<<<<<
 *         CHKERR( BVNormColumn(self.bv, j, ntype, &norm) )
 *         return toReal(norm)
 */
  __pyx_v_norm = 0.0;

  /* "SLEPc/BV.pyx":754
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNormColumn(self.bv, j, ntype, &norm) )             # <<<<<<<<<<<<<<
 *         return toReal(norm)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVNormColumn(__pyx_v_self->bv, __pyx_v_j, __pyx_v_ntype, (&__pyx_v_norm))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 754, __pyx_L1_error)

  /* "SLEPc/BV.pyx":755
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNormColumn(self.bv, j, ntype, &norm) )
 *         return toReal(norm)             # <<<<<<<<<<<<<<
 * 
 *     def norm(self, norm_type=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 755, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":728
 *         CHKERR( BVMultVec(self.bv, sval1, sval2, y.vec, qval) )
 * 
 *     def normColumn(self, int j, norm_type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix norm of the BV.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.normColumn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":757
 *         return toReal(norm)
 * 
 *     def norm(self, norm_type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix norm of the BV.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_69norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_68norm[] = "BV.norm(self, norm_type=None)\n\n        Computes the matrix norm of the BV.\n\n        Parameters\n        ----------\n        norm_type: PETSC.NormType enumerate\n            The norm type.\n\n        Returns\n        -------\n        norm: float\n\n        Notes\n        -----\n        All active columns (except the leading ones) are considered as a\n        matrix. The allowed norms are NORM_1, NORM_FROBENIUS, and\n        NORM_INFINITY.\n\n        This operation fails if a non-standard inner product has been specified\n        with BVSetMatrix().\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_69norm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_norm_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_norm_type,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_norm_type);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "norm") < 0)) __PYX_ERR(3, 757, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_norm_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("norm", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 757, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_68norm(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_norm_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_68norm(struct PySlepcBVObject *__pyx_v_self, PyObject *__pyx_v_norm_type) {
  NormType __pyx_v_ntype;
  PetscReal __pyx_v_norm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  NormType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("norm", 0);

  /* "SLEPc/BV.pyx":779
 *         with BVSetMatrix().
 *         """
 *         cdef PetscNormType ntype = PETSC_NORM_FROBENIUS             # <<<<<<<<<<<<<<
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0
 */
  __pyx_v_ntype = NORM_FROBENIUS;

  /* "SLEPc/BV.pyx":780
 *         """
 *         cdef PetscNormType ntype = PETSC_NORM_FROBENIUS
 *         if norm_type is not None: ntype = norm_type             # <<<<<<<<<<<<<<
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNorm(self.bv, ntype, &norm) )
 */
  __pyx_t_1 = (__pyx_v_norm_type != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((NormType)__Pyx_PyInt_As_NormType(__pyx_v_norm_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 780, __pyx_L1_error)
    __pyx_v_ntype = __pyx_t_3;
  }

  /* "SLEPc/BV.pyx":781
 *         cdef PetscNormType ntype = PETSC_NORM_FROBENIUS
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0             # <<<<<<<<<<<<<<
 *         CHKERR( BVNorm(self.bv, ntype, &norm) )
 *         return toReal(norm)
 */
  __pyx_v_norm = 0.0;

  /* "SLEPc/BV.pyx":782
 *         if norm_type is not None: ntype = norm_type
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNorm(self.bv, ntype, &norm) )             # <<<<<<<<<<<<<<
 *         return toReal(norm)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVNorm(__pyx_v_self->bv, __pyx_v_ntype, (&__pyx_v_norm))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(3, 782, __pyx_L1_error)

  /* "SLEPc/BV.pyx":783
 *         cdef PetscReal norm = 0
 *         CHKERR( BVNorm(self.bv, ntype, &norm) )
 *         return toReal(norm)             # <<<<<<<<<<<<<<
 * 
 *     def setRandom(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":757
 *         return toReal(norm)
 * 
 *     def norm(self, norm_type=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the matrix norm of the BV.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":785
 *         return toReal(norm)
 * 
 *     def setRandom(self):             # <<<<<<<<<<<<<<
 *         """
 *         Set the active columns of BV to random numbers.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_70setRandom[] = "BV.setRandom(self)\n\n        Set the active columns of BV to random numbers.\n\n        Notes\n        -----\n        All active columns (except the leading ones) are modified.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRandom (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setRandom", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setRandom", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(((struct PySlepcBVObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_70setRandom(struct PySlepcBVObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setRandom", 0);

  /* "SLEPc/BV.pyx":793
 *         All active columns (except the leading ones) are modified.
 *         """
 *         CHKERR( BVSetRandom(self.bv) )             # <<<<<<<<<<<<<<
 * 
 *     def orthogonalizeVec(self, Vec v not None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVSetRandom(__pyx_v_self->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 793, __pyx_L1_error)

  /* "SLEPc/BV.pyx":785
 *         return toReal(norm)
 * 
 *     def setRandom(self):             # <<<<<<<<<<<<<<
 *         """
 *         Set the active columns of BV to random numbers.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.setRandom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":795
 *         CHKERR( BVSetRandom(self.bv) )
 * 
 *     def orthogonalizeVec(self, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Orthogonalize a vector with respect to a set of vectors.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_72orthogonalizeVec[] = "BV.orthogonalizeVec(self, Vec v)\n\n        Orthogonalize a vector with respect to a set of vectors.\n\n        Parameters\n        ----------\n        v:  Vec\n            Vector to be orthogonalized, modified on return.\n\n        Returns\n        -------\n        norm: float\n            The norm of the resulting vector.\n        lindep: boolean\n            Flag indicating that refinement did not improve the\n            quality of orthogonalization.\n\n        Notes\n        -----\n        This function applies an orthogonal projector to project\n        vector ``v`` onto the orthogonal complement of the span of the\n        columns of the BV.\n\n        This routine does not normalize the resulting vector.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_v = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("orthogonalizeVec (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "orthogonalizeVec") < 0)) __PYX_ERR(3, 795, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_v = ((struct PyPetscVecObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("orthogonalizeVec", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 795, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalizeVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "v", 0))) __PYX_ERR(3, 795, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_72orthogonalizeVec(struct PySlepcBVObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_v) {
  PetscReal __pyx_v_norm;
  PetscBool __pyx_v_ldep;
  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;
  __Pyx_RefNannySetupContext("orthogonalizeVec", 0);

  /* "SLEPc/BV.pyx":820
 *         This routine does not normalize the resulting vector.
 *         """
 *         cdef PetscReal norm = 0             # <<<<<<<<<<<<<<
 *         cdef PetscBool ldep = PETSC_FALSE
 *         CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) )
 */
  __pyx_v_norm = 0.0;

  /* "SLEPc/BV.pyx":821
 *         """
 *         cdef PetscReal norm = 0
 *         cdef PetscBool ldep = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) )
 *         return (toReal(norm), <bint>ldep)
 */
  __pyx_v_ldep = PETSC_FALSE;

  /* "SLEPc/BV.pyx":822
 *         cdef PetscReal norm = 0
 *         cdef PetscBool ldep = PETSC_FALSE
 *         CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) )             # <<<<<<<<<<<<<<
 *         return (toReal(norm), <bint>ldep)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVOrthogonalizeVec(__pyx_v_self->bv, __pyx_v_v->vec, NULL, (&__pyx_v_norm), (&__pyx_v_ldep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(3, 822, __pyx_L1_error)

  /* "SLEPc/BV.pyx":823
 *         cdef PetscBool ldep = PETSC_FALSE
 *         CHKERR( BVOrthogonalizeVec(self.bv, v.vec, NULL, &norm, &ldep) )
 *         return (toReal(norm), <bint>ldep)             # <<<<<<<<<<<<<<
 * 
 *     def orthogonalize(self, Mat R=None, **kargs):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_norm); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_PetscBool(__pyx_v_ldep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/BV.pyx":795
 *         CHKERR( BVSetRandom(self.bv) )
 * 
 *     def orthogonalizeVec(self, Vec v not None):             # <<<<<<<<<<<<<<
 *         """
 *         Orthogonalize a vector with respect to a set of vectors.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalizeVec", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/BV.pyx":825
 *         return (toReal(norm), <bint>ldep)
 * 
 *     def orthogonalize(self, Mat R=None, **kargs):             # <<<<<<<<<<<<<<
 *         """
 *         Orthogonalize all columns (except leading ones),
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2BV_74orthogonalize[] = "BV.orthogonalize(self, Mat R=None, **kargs)\n\n        Orthogonalize all columns (except leading ones),\n        that is, compute the QR decomposition.\n\n        Parameters\n        ----------\n        R: Mat or None\n            A sequential dense matrix.\n\n        Notes\n        -----\n        The output satisfies ``V0 = V*R`` (where V0 represent the input V) and ``V'*V = I``.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_R = 0;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("orthogonalize (wrapper)", 0);
  __pyx_v_kargs = PyDict_New(); if (unlikely(!__pyx_v_kargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kargs);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_R,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscMatObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_R);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kargs, values, pos_args, "orthogonalize") < 0)) __PYX_ERR(3, 825, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_R = ((struct PyPetscMatObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("orthogonalize", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 825, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kargs); __pyx_v_kargs = 0;
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_R), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "R", 0))) __PYX_ERR(3, 825, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(((struct PySlepcBVObject *)__pyx_v_self), __pyx_v_R, __pyx_v_kargs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2BV_74orthogonalize(struct PySlepcBVObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_R, PyObject *__pyx_v_kargs) {
  Mat __pyx_v_Rmat;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  void *__pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("orthogonalize", 0);

  /* "SLEPc/BV.pyx":839
 *         The output satisfies ``V0 = V*R`` (where V0 represent the input V) and ``V'*V = I``.
 *         """
 *         if kargs: self.setOrthogonalization(**kargs)             # <<<<<<<<<<<<<<
 *         cdef PetscMat Rmat = NULL if R is None else R.mat
 *         CHKERR( BVOrthogonalize(self.bv, Rmat) )
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_kargs); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(3, 839, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setOrthogonalization); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_v_kargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "SLEPc/BV.pyx":840
 *         """
 *         if kargs: self.setOrthogonalization(**kargs)
 *         cdef PetscMat Rmat = NULL if R is None else R.mat             # <<<<<<<<<<<<<<
 *         CHKERR( BVOrthogonalize(self.bv, Rmat) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_R) == Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_4 = __pyx_v_R->mat;
  }
  __pyx_v_Rmat = __pyx_t_4;

  /* "SLEPc/BV.pyx":841
 *         if kargs: self.setOrthogonalization(**kargs)
 *         cdef PetscMat Rmat = NULL if R is None else R.mat
 *         CHKERR( BVOrthogonalize(self.bv, Rmat) )             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(BVOrthogonalize(__pyx_v_self->bv, __pyx_v_Rmat)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(3, 841, __pyx_L1_error)

  /* "SLEPc/BV.pyx":825
 *         return (toReal(norm), <bint>ldep)
 * 
 *     def orthogonalize(self, Mat R=None, **kargs):             # <<<<<<<<<<<<<<
 *         """
 *         Orthogonalize all columns (except leading ones),
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.BV.orthogonalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":72
 *     MatType   = DSMatType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.ds
 *         self.ds = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(((struct PySlepcDSObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_2DS___cinit__(struct PySlepcDSObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/DS.pyx":73
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.ds             # <<<<<<<<<<<<<<
 *         self.ds = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->ds));

  /* "SLEPc/DS.pyx":74
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.ds
 *         self.ds = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->ds = NULL;

  /* "SLEPc/DS.pyx":72
 *     MatType   = DSMatType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.ds
 *         self.ds = NULL
 */

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

/* "SLEPc/DS.pyx":76
 *         self.ds = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the DS data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_2view[] = "DS.view(self, Viewer viewer=None)\n\n        Prints the DS data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(10, 76, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 76, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(10, 76, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_2view(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_2view(struct PySlepcDSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/DS.pyx":86
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( DSView(self.ds, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/DS.pyx":87
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( DSView(self.ds, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/DS.pyx":88
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( DSView(self.ds, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSView(__pyx_v_self->ds, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(10, 88, __pyx_L1_error)

  /* "SLEPc/DS.pyx":76
 *         self.ds = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the DS data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":90
 *         CHKERR( DSView(self.ds, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_4destroy[] = "DS.destroy(self)\n\n        Destroys the DS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_4destroy(struct PySlepcDSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/DS.pyx":94
 *         Destroys the DS object.
 *         """
 *         CHKERR( DSDestroy(&self.ds) )             # <<<<<<<<<<<<<<
 *         self.ds = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSDestroy((&__pyx_v_self->ds))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 94, __pyx_L1_error)

  /* "SLEPc/DS.pyx":95
 *         """
 *         CHKERR( DSDestroy(&self.ds) )
 *         self.ds = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->ds = NULL;

  /* "SLEPc/DS.pyx":96
 *         CHKERR( DSDestroy(&self.ds) )
 *         self.ds = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":90
 *         CHKERR( DSView(self.ds, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the DS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":98
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_6reset[] = "DS.reset(self)\n\n        Resets the DS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_6reset(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_6reset(struct PySlepcDSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/DS.pyx":102
 *         Resets the DS object.
 *         """
 *         CHKERR( DSReset(self.ds) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSReset(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 102, __pyx_L1_error)

  /* "SLEPc/DS.pyx":98
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the DS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":104
 *         CHKERR( DSReset(self.ds) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_8create[] = "DS.create(self, comm=None)\n\n        Creates the DS object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(10, 104, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 104, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_8create(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_8create(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  DS __pyx_v_newds;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/DS.pyx":114
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcDS newds = NULL
 *         CHKERR( DSCreate(ccomm, &newds) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 114, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/DS.pyx":115
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcDS newds = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( DSCreate(ccomm, &newds) )
 *         SlepcCLEAR(self.obj); self.ds = newds
 */
  __pyx_v_newds = NULL;

  /* "SLEPc/DS.pyx":116
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcDS newds = NULL
 *         CHKERR( DSCreate(ccomm, &newds) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.ds = newds
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSCreate(__pyx_v_ccomm, (&__pyx_v_newds))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 116, __pyx_L1_error)

  /* "SLEPc/DS.pyx":117
 *         cdef SlepcDS newds = NULL
 *         CHKERR( DSCreate(ccomm, &newds) )
 *         SlepcCLEAR(self.obj); self.ds = newds             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->ds = __pyx_v_newds;

  /* "SLEPc/DS.pyx":118
 *         CHKERR( DSCreate(ccomm, &newds) )
 *         SlepcCLEAR(self.obj); self.ds = newds
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, ds_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":104
 *         CHKERR( DSReset(self.ds) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the DS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":120
 *         return self
 * 
 *     def setType(self, ds_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_10setType[] = "DS.setType(self, ds_type)\n\n        Selects the type for the DS object.\n\n        Parameters\n        ----------\n        ds_type: `DS.Type` enumerate\n                  The direct solver type to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ds_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ds_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ds_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(10, 120, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ds_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 120, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_10setType(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ds_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_10setType(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ds_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_ds_type);

  /* "SLEPc/DS.pyx":129
 *                   The direct solver type to be used.
 *         """
 *         cdef SlepcDSType cval = NULL             # <<<<<<<<<<<<<<
 *         ds_type = str2bytes(ds_type, &cval)
 *         CHKERR( DSSetType(self.ds, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/DS.pyx":130
 *         """
 *         cdef SlepcDSType cval = NULL
 *         ds_type = str2bytes(ds_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetType(self.ds, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_ds_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_ds_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/DS.pyx":131
 *         cdef SlepcDSType cval = NULL
 *         ds_type = str2bytes(ds_type, &cval)
 *         CHKERR( DSSetType(self.ds, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetType(__pyx_v_self->ds, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 131, __pyx_L1_error)

  /* "SLEPc/DS.pyx":120
 *         return self
 * 
 *     def setType(self, ds_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the DS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ds_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":133
 *         CHKERR( DSSetType(self.ds, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the DS type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_12getType[] = "DS.getType(self)\n\n        Gets the DS type of this object.\n\n        Returns\n        -------\n        type: `DS.Type` enumerate\n              The direct solver type currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_12getType(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_12getType(struct PySlepcDSObject *__pyx_v_self) {
  const char* __pyx_v_ds_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/DS.pyx":142
 *               The direct solver type currently being used.
 *         """
 *         cdef SlepcDSType ds_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetType(self.ds, &ds_type) )
 *         return bytes2str(ds_type)
 */
  __pyx_v_ds_type = NULL;

  /* "SLEPc/DS.pyx":143
 *         """
 *         cdef SlepcDSType ds_type = NULL
 *         CHKERR( DSGetType(self.ds, &ds_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(ds_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetType(__pyx_v_self->ds, (&__pyx_v_ds_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 143, __pyx_L1_error)

  /* "SLEPc/DS.pyx":144
 *         cdef SlepcDSType ds_type = NULL
 *         CHKERR( DSGetType(self.ds, &ds_type) )
 *         return bytes2str(ds_type)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_ds_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":133
 *         CHKERR( DSSetType(self.ds, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the DS type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":146
 *         return bytes2str(ds_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all DS options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_14setOptionsPrefix[] = "DS.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all DS options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all DS option\n                requests.\n\n        Notes\n        -----\n        A hyphen (``-``) must NOT be given at the beginning of the\n        prefix name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(10, 146, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_14setOptionsPrefix(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/DS.pyx":163
 *         AUTOMATICALLY the hyphen.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( DSSetOptionsPrefix(self.ds, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/DS.pyx":164
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetOptionsPrefix(self.ds, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/DS.pyx":165
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( DSSetOptionsPrefix(self.ds, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetOptionsPrefix(__pyx_v_self->ds, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 165, __pyx_L1_error)

  /* "SLEPc/DS.pyx":146
 *         return bytes2str(ds_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all DS options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":167
 *         CHKERR( DSSetOptionsPrefix(self.ds, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all DS options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_16getOptionsPrefix[] = "DS.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all DS options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this DS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_16getOptionsPrefix(struct PySlepcDSObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/DS.pyx":177
 *                 The prefix string set for this DS object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetOptionsPrefix(self.ds, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/DS.pyx":178
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( DSGetOptionsPrefix(self.ds, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetOptionsPrefix(__pyx_v_self->ds, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 178, __pyx_L1_error)

  /* "SLEPc/DS.pyx":179
 *         cdef const_char *prefix = NULL
 *         CHKERR( DSGetOptionsPrefix(self.ds, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":167
 *         CHKERR( DSSetOptionsPrefix(self.ds, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all DS options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":181
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets DS options from the options database.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_18setFromOptions[] = "DS.setFromOptions(self)\n\n        Sets DS options from the options database.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_18setFromOptions(struct PySlepcDSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/DS.pyx":190
 *         option.
 *         """
 *         CHKERR( DSSetFromOptions(self.ds) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetFromOptions(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 190, __pyx_L1_error)

  /* "SLEPc/DS.pyx":181
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets DS options from the options database.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":194
 *     #
 * 
 *     def allocate(self, ld):             # <<<<<<<<<<<<<<
 *         """
 *         Allocates memory for internal storage or matrices in DS.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_20allocate[] = "DS.allocate(self, ld)\n\n        Allocates memory for internal storage or matrices in DS.\n\n        Parameters\n        ----------\n        ld: integer\n            Leading dimension (maximum allowed dimension for the\n            matrices, including the extra row if present).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ld = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("allocate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ld,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ld)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allocate") < 0)) __PYX_ERR(10, 194, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ld = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("allocate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 194, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ld);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_20allocate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ld) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("allocate", 0);

  /* "SLEPc/DS.pyx":204
 *             matrices, including the extra row if present).
 *         """
 *         cdef PetscInt val = ld             # <<<<<<<<<<<<<<
 *         CHKERR( DSAllocate(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_ld); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 204, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/DS.pyx":205
 *         """
 *         cdef PetscInt val = ld
 *         CHKERR( DSAllocate(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getLeadingDimension(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSAllocate(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 205, __pyx_L1_error)

  /* "SLEPc/DS.pyx":194
 *     #
 * 
 *     def allocate(self, ld):             # <<<<<<<<<<<<<<
 *         """
 *         Allocates memory for internal storage or matrices in DS.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":207
 *         CHKERR( DSAllocate(self.ds, val) )
 * 
 *     def getLeadingDimension(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the leading dimension of the allocated matrices.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_22getLeadingDimension[] = "DS.getLeadingDimension(self)\n\n        Returns the leading dimension of the allocated matrices.\n\n        Returns\n        -------\n        ld: integer\n            Leading dimension (maximum allowed dimension for the matrices).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLeadingDimension (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getLeadingDimension", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLeadingDimension", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_22getLeadingDimension(struct PySlepcDSObject *__pyx_v_self) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getLeadingDimension", 0);

  /* "SLEPc/DS.pyx":216
 *             Leading dimension (maximum allowed dimension for the matrices).
 *         """
 *         cdef PetscInt val = 0             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetLeadingDimension(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = 0;

  /* "SLEPc/DS.pyx":217
 *         """
 *         cdef PetscInt val = 0
 *         CHKERR( DSGetLeadingDimension(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetLeadingDimension(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 217, __pyx_L1_error)

  /* "SLEPc/DS.pyx":218
 *         cdef PetscInt val = 0
 *         CHKERR( DSGetLeadingDimension(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setState(self, state):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":207
 *         CHKERR( DSAllocate(self.ds, val) )
 * 
 *     def getLeadingDimension(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the leading dimension of the allocated matrices.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getLeadingDimension", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":220
 *         return val
 * 
 *     def setState(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Change the state of the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_25setState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_24setState[] = "DS.setState(self, state)\n\n        Change the state of the DS object.\n\n        Parameters\n        ----------\n        state: `DS.StateType` enumerate\n               The new state.\n\n        Notes\n        -----\n        The state indicates that the dense system is in an initial\n        state (raw), in an intermediate state (such as tridiagonal,\n        Hessenberg or Hessenberg-triangular), in a condensed state\n        (such as diagonal, Schur or generalized Schur), or in a\n        truncated state.\n\n        This function is normally used to return to the raw state when\n        the condensed structure is destroyed.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_25setState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setState (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_state,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setState") < 0)) __PYX_ERR(10, 220, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_state = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setState", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 220, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_24setState(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_state);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_24setState(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_state) {
  DSStateType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  DSStateType __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setState", 0);

  /* "SLEPc/DS.pyx":240
 *         the condensed structure is destroyed.
 *         """
 *         cdef SlepcDSStateType val = state             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetState(self.ds, val) )
 * 
 */
  __pyx_t_1 = ((DSStateType)__Pyx_PyInt_As_DSStateType(__pyx_v_state)); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 240, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/DS.pyx":241
 *         """
 *         cdef SlepcDSStateType val = state
 *         CHKERR( DSSetState(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getState(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetState(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 241, __pyx_L1_error)

  /* "SLEPc/DS.pyx":220
 *         return val
 * 
 *     def setState(self, state):             # <<<<<<<<<<<<<<
 *         """
 *         Change the state of the DS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":243
 *         CHKERR( DSSetState(self.ds, val) )
 * 
 *     def getState(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current state.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_27getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_26getState[] = "DS.getState(self)\n\n        Returns the current state.\n\n        Returns\n        -------\n        state: `DS.StateType` enumerate\n               The current state.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_27getState(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getState (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getState", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getState", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_26getState(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_26getState(struct PySlepcDSObject *__pyx_v_self) {
  DSStateType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getState", 0);

  /* "SLEPc/DS.pyx":252
 *                The current state.
 *         """
 *         cdef SlepcDSStateType val = DS_STATE_RAW             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetState(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = DS_STATE_RAW;

  /* "SLEPc/DS.pyx":253
 *         """
 *         cdef SlepcDSStateType val = DS_STATE_RAW
 *         CHKERR( DSGetState(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetState(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 253, __pyx_L1_error)

  /* "SLEPc/DS.pyx":254
 *         cdef SlepcDSStateType val = DS_STATE_RAW
 *         CHKERR( DSGetState(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, n=None, m=None, l=None, k=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_DSStateType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":243
 *         CHKERR( DSSetState(self.ds, val) )
 * 
 *     def getState(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current state.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":256
 *         return val
 * 
 *     def setDimensions(self, n=None, m=None, l=None, k=None):             # <<<<<<<<<<<<<<
 *         """
 *         Resize the matrices in the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_28setDimensions[] = "DS.setDimensions(self, n=None, m=None, l=None, k=None)\n\n        Resize the matrices in the DS object.\n\n        Parameters\n        ----------\n        n: int, optional\n           The new size.\n        m: int, optional\n           The new column size (only for SVD).\n        l: int, optional\n           Number of locked (inactive) leading columns.\n        k: int, optional\n           Intermediate dimension (e.g., position of arrow).\n\n        Notes\n        -----\n        The internal arrays are not reallocated.\n\n        The value `m` is not used except in the case of DS.SVD.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_v_l = 0;
  PyObject *__pyx_v_k = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,&__pyx_n_s_m,&__pyx_n_s_l,&__pyx_n_s_k,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_l);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(10, 256, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_n = values[0];
    __pyx_v_m = values[1];
    __pyx_v_l = values[2];
    __pyx_v_k = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 256, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_n, __pyx_v_m, __pyx_v_l, __pyx_v_k);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_28setDimensions(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n, PyObject *__pyx_v_m, PyObject *__pyx_v_l, PyObject *__pyx_v_k) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PetscInt __pyx_v_ival4;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/DS.pyx":277
 *         The value `m` is not used except in the case of DS.SVD.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/DS.pyx":278
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/DS.pyx":279
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival4 = 0
 *         if n is not None: ival1 = asInt(n)
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/DS.pyx":280
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0             # <<<<<<<<<<<<<<
 *         if n is not None: ival1 = asInt(n)
 *         if m is not None: ival2 = asInt(m)
 */
  __pyx_v_ival4 = 0;

  /* "SLEPc/DS.pyx":281
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0
 *         if n is not None: ival1 = asInt(n)             # <<<<<<<<<<<<<<
 *         if m is not None: ival2 = asInt(m)
 *         if l is not None: ival3 = asInt(l)
 */
  __pyx_t_1 = (__pyx_v_n != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_n); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 281, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/DS.pyx":282
 *         cdef PetscInt ival4 = 0
 *         if n is not None: ival1 = asInt(n)
 *         if m is not None: ival2 = asInt(m)             # <<<<<<<<<<<<<<
 *         if l is not None: ival3 = asInt(l)
 *         if k is not None: ival4 = asInt(k)
 */
  __pyx_t_2 = (__pyx_v_m != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_m); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 282, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/DS.pyx":283
 *         if n is not None: ival1 = asInt(n)
 *         if m is not None: ival2 = asInt(m)
 *         if l is not None: ival3 = asInt(l)             # <<<<<<<<<<<<<<
 *         if k is not None: ival4 = asInt(k)
 *         CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) )
 */
  __pyx_t_1 = (__pyx_v_l != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_l); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 283, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/DS.pyx":284
 *         if m is not None: ival2 = asInt(m)
 *         if l is not None: ival3 = asInt(l)
 *         if k is not None: ival4 = asInt(k)             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) )
 * 
 */
  __pyx_t_2 = (__pyx_v_k != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_k); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(10, 284, __pyx_L1_error)
    __pyx_v_ival4 = __pyx_t_3;
  }

  /* "SLEPc/DS.pyx":285
 *         if l is not None: ival3 = asInt(l)
 *         if k is not None: ival4 = asInt(k)
 *         CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetDimensions(__pyx_v_self->ds, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3, __pyx_v_ival4)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(10, 285, __pyx_L1_error)

  /* "SLEPc/DS.pyx":256
 *         return val
 * 
 *     def setDimensions(self, n=None, m=None, l=None, k=None):             # <<<<<<<<<<<<<<
 *         """
 *         Resize the matrices in the DS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":287
 *         CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current dimensions.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_30getDimensions[] = "DS.getDimensions(self)\n\n        Returns the current dimensions.\n\n        Returns\n        -------\n        n: int\n           The new size.\n        m: int\n           The new column size (only for SVD).\n        l: int\n           Number of locked (inactive) leading columns.\n        k: int\n           Intermediate dimension (e.g., position of arrow).\n        t: int\n           Truncated length.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_30getDimensions(struct PySlepcDSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PetscInt __pyx_v_ival4;
  PetscInt __pyx_v_ival5;
  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 = NULL;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/DS.pyx":304
 *            Truncated length.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/DS.pyx":305
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/DS.pyx":306
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival4 = 0
 *         cdef PetscInt ival5 = 0
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/DS.pyx":307
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival5 = 0
 *         CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) )
 */
  __pyx_v_ival4 = 0;

  /* "SLEPc/DS.pyx":308
 *         cdef PetscInt ival3 = 0
 *         cdef PetscInt ival4 = 0
 *         cdef PetscInt ival5 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5))
 */
  __pyx_v_ival5 = 0;

  /* "SLEPc/DS.pyx":309
 *         cdef PetscInt ival4 = 0
 *         cdef PetscInt ival5 = 0
 *         CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetDimensions(__pyx_v_self->ds, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3), (&__pyx_v_ival4), (&__pyx_v_ival5))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 309, __pyx_L1_error)

  /* "SLEPc/DS.pyx":310
 *         cdef PetscInt ival5 = 0
 *         CHKERR( DSGetDimensions(self.ds, &ival1, &ival2, &ival3, &ival4, &ival5) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5))             # <<<<<<<<<<<<<<
 * 
 *     def setMethod(self, meth):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival4); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival5); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":287
 *         CHKERR( DSSetDimensions(self.ds, ival1, ival2, ival3, ival4) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the current dimensions.
 */

  /* 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_7);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":312
 *         return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5))
 * 
 *     def setMethod(self, meth):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the method to be used to solve the problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_32setMethod[] = "DS.setMethod(self, meth)\n\n        Selects the method to be used to solve the problem.\n\n        Parameters\n        ----------\n        meth: int\n              An index indentifying the method.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_meth = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setMethod (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_meth,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_meth)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setMethod") < 0)) __PYX_ERR(10, 312, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_meth = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setMethod", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 312, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_meth);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_32setMethod(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_meth) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setMethod", 0);

  /* "SLEPc/DS.pyx":321
 *               An index indentifying the method.
 *         """
 *         cdef PetscInt val = meth             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetMethod(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_meth); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 321, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/DS.pyx":322
 *         """
 *         cdef PetscInt val = meth
 *         CHKERR( DSSetMethod(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getMethod(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetMethod(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 322, __pyx_L1_error)

  /* "SLEPc/DS.pyx":312
 *         return (toInt(ival1), toInt(ival2), toInt(ival3), toInt(ival4), toInt(ival5))
 * 
 *     def setMethod(self, meth):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the method to be used to solve the problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":324
 *         CHKERR( DSSetMethod(self.ds, val) )
 * 
 *     def getMethod(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the method currently used in the DS.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_34getMethod[] = "DS.getMethod(self)\n\n        Gets the method currently used in the DS.\n\n        Returns\n        -------\n        meth: int\n              Identifier of the method.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMethod (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getMethod", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getMethod", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_34getMethod(struct PySlepcDSObject *__pyx_v_self) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getMethod", 0);

  /* "SLEPc/DS.pyx":333
 *               Identifier of the method.
 *         """
 *         cdef PetscInt val = 0             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetMethod(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = 0;

  /* "SLEPc/DS.pyx":334
 *         """
 *         cdef PetscInt val = 0
 *         CHKERR( DSGetMethod(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetMethod(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 334, __pyx_L1_error)

  /* "SLEPc/DS.pyx":335
 *         cdef PetscInt val = 0
 *         CHKERR( DSGetMethod(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setCompact(self, comp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":324
 *         CHKERR( DSSetMethod(self.ds, val) )
 * 
 *     def getMethod(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the method currently used in the DS.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getMethod", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":337
 *         return val
 * 
 *     def setCompact(self, comp):             # <<<<<<<<<<<<<<
 *         """
 *         Switch to compact storage of matrices.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_36setCompact[] = "DS.setCompact(self, comp)\n\n        Switch to compact storage of matrices.\n\n        Parameters\n        ----------\n        comp: boolean\n              A boolean flag.\n\n        Notes\n        -----\n        Compact storage is used in some `DS` types such as\n        `DS.Type.HEP` when the matrix is tridiagonal. This flag\n        can be used to indicate whether the user provides the\n        matrix entries via the compact form (the tridiagonal\n        `DS.MatType.T`) or the non-compact one (`DS.MatType.A`).\n\n        The default is ``False``.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comp = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCompact (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comp,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCompact") < 0)) __PYX_ERR(10, 337, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_comp = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCompact", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 337, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setCompact", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_comp);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_36setCompact(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_comp) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setCompact", 0);

  /* "SLEPc/DS.pyx":356
 *         The default is ``False``.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if comp: val = PETSC_TRUE
 *         CHKERR( DSSetCompact(self.ds, val) )
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":357
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         if comp: val = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetCompact(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_comp); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 357, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_val = PETSC_TRUE;
  }

  /* "SLEPc/DS.pyx":358
 *         cdef PetscBool val = PETSC_FALSE
 *         if comp: val = PETSC_TRUE
 *         CHKERR( DSSetCompact(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getCompact(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetCompact(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 358, __pyx_L1_error)

  /* "SLEPc/DS.pyx":337
 *         return val
 * 
 *     def setCompact(self, comp):             # <<<<<<<<<<<<<<
 *         """
 *         Switch to compact storage of matrices.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setCompact", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":360
 *         CHKERR( DSSetCompact(self.ds, val) )
 * 
 *     def getCompact(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the compact storage flag.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_38getCompact[] = "DS.getCompact(self)\n\n        Gets the compact storage flag.\n\n        Returns\n        -------\n        comp: boolean\n              The flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCompact (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getCompact", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCompact", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_38getCompact(struct PySlepcDSObject *__pyx_v_self) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getCompact", 0);

  /* "SLEPc/DS.pyx":369
 *               The flag.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetCompact(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":370
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetCompact(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetCompact(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 370, __pyx_L1_error)

  /* "SLEPc/DS.pyx":371
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetCompact(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setExtraRow(self, ext):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":360
 *         CHKERR( DSSetCompact(self.ds, val) )
 * 
 *     def getCompact(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the compact storage flag.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getCompact", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":373
 *         return val
 * 
 *     def setExtraRow(self, ext):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that the matrix has one extra row.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_40setExtraRow[] = "DS.setExtraRow(self, ext)\n\n        Sets a flag to indicate that the matrix has one extra row.\n\n        Parameters\n        ----------\n        ext: boolean\n             A boolean flag.\n\n        Notes\n        -----\n        In Krylov methods it is useful that the matrix representing\n        the direct solver has one extra row, i.e., has dimension (n+1)\n        x n. If this flag is activated, all transformations applied to\n        the right of the matrix also affect this additional row. In\n        that case, (n+1) must be less or equal than the leading\n        dimension.\n\n        The default is ``False``.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ext = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setExtraRow (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ext,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ext)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExtraRow") < 0)) __PYX_ERR(10, 373, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ext = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setExtraRow", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 373, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ext);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_40setExtraRow(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ext) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setExtraRow", 0);

  /* "SLEPc/DS.pyx":393
 *         The default is ``False``.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if ext: val = PETSC_TRUE
 *         CHKERR( DSSetExtraRow(self.ds, val) )
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":394
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         if ext: val = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetExtraRow(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ext); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 394, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_val = PETSC_TRUE;
  }

  /* "SLEPc/DS.pyx":395
 *         cdef PetscBool val = PETSC_FALSE
 *         if ext: val = PETSC_TRUE
 *         CHKERR( DSSetExtraRow(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getExtraRow(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetExtraRow(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 395, __pyx_L1_error)

  /* "SLEPc/DS.pyx":373
 *         return val
 * 
 *     def setExtraRow(self, ext):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that the matrix has one extra row.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":397
 *         CHKERR( DSSetExtraRow(self.ds, val) )
 * 
 *     def getExtraRow(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the extra row flag.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_42getExtraRow[] = "DS.getExtraRow(self)\n\n        Gets the extra row flag.\n\n        Returns\n        -------\n        comp: boolean\n              The flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getExtraRow (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getExtraRow", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getExtraRow", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_42getExtraRow(struct PySlepcDSObject *__pyx_v_self) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getExtraRow", 0);

  /* "SLEPc/DS.pyx":406
 *               The flag.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetExtraRow(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":407
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetExtraRow(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetExtraRow(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 407, __pyx_L1_error)

  /* "SLEPc/DS.pyx":408
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetExtraRow(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setRefined(self, ref):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 408, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":397
 *         CHKERR( DSSetExtraRow(self.ds, val) )
 * 
 *     def getExtraRow(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the extra row flag.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":410
 *         return val
 * 
 *     def setRefined(self, ref):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that refined vectors must be computed.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_44setRefined[] = "DS.setRefined(self, ref)\n\n        Sets a flag to indicate that refined vectors must be computed.\n\n        Parameters\n        ----------\n        ref: boolean\n             A boolean flag.\n\n        Notes\n        -----\n        Normally the vectors returned in `DS.MatType.X` are eigenvectors\n        of the projected matrix. With this flag activated, `vectors()`\n        will return the right singular vector of the smallest singular\n        value of matrix At-theta*I, where At is the extended (n+1)xn\n        matrix and theta is the Ritz value. This is used in the\n        refined Ritz approximation.\n\n        The default is ``False``.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRefined (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRefined") < 0)) __PYX_ERR(10, 410, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ref = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRefined", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 410, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setRefined", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_ref);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_44setRefined(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_ref) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setRefined", 0);

  /* "SLEPc/DS.pyx":430
 *         The default is ``False``.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if ref: val = PETSC_TRUE
 *         CHKERR( DSSetRefined(self.ds, val) )
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":431
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         if ref: val = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( DSSetRefined(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ref); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(10, 431, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_val = PETSC_TRUE;
  }

  /* "SLEPc/DS.pyx":432
 *         cdef PetscBool val = PETSC_FALSE
 *         if ref: val = PETSC_TRUE
 *         CHKERR( DSSetRefined(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getRefined(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSSetRefined(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 432, __pyx_L1_error)

  /* "SLEPc/DS.pyx":410
 *         return val
 * 
 *     def setRefined(self, ref):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that refined vectors must be computed.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.setRefined", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":434
 *         CHKERR( DSSetRefined(self.ds, val) )
 * 
 *     def getRefined(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the refined vectors flag.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_46getRefined[] = "DS.getRefined(self)\n\n        Gets the refined vectors flag.\n\n        Returns\n        -------\n        comp: boolean\n              The flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRefined (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRefined", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRefined", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_46getRefined(struct PySlepcDSObject *__pyx_v_self) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getRefined", 0);

  /* "SLEPc/DS.pyx":443
 *               The flag.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( DSGetRefined(self.ds, &val) )
 *         return val
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/DS.pyx":444
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetRefined(self.ds, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSGetRefined(__pyx_v_self->ds, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 444, __pyx_L1_error)

  /* "SLEPc/DS.pyx":445
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( DSGetRefined(self.ds, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def truncate(self, n):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/DS.pyx":434
 *         CHKERR( DSSetRefined(self.ds, val) )
 * 
 *     def getRefined(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the refined vectors flag.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.getRefined", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":447
 *         return val
 * 
 *     def truncate(self, n):             # <<<<<<<<<<<<<<
 *         """
 *         Truncates the system represented in the DS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_48truncate[] = "DS.truncate(self, n)\n\n        Truncates the system represented in the DS object.\n\n        Parameters\n        ----------\n        n: integer\n           The new size.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("truncate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "truncate") < 0)) __PYX_ERR(10, 447, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_n = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("truncate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(10, 447, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(((struct PySlepcDSObject *)__pyx_v_self), __pyx_v_n);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_48truncate(struct PySlepcDSObject *__pyx_v_self, PyObject *__pyx_v_n) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("truncate", 0);

  /* "SLEPc/DS.pyx":456
 *            The new size.
 *         """
 *         cdef PetscInt val = n             # <<<<<<<<<<<<<<
 *         CHKERR( DSTruncate(self.ds, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_n); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(10, 456, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/DS.pyx":457
 *         """
 *         cdef PetscInt val = n
 *         CHKERR( DSTruncate(self.ds, val) )             # <<<<<<<<<<<<<<
 * 
 *     def updateExtraRow(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSTruncate(__pyx_v_self->ds, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(10, 457, __pyx_L1_error)

  /* "SLEPc/DS.pyx":447
 *         return val
 * 
 *     def truncate(self, n):             # <<<<<<<<<<<<<<
 *         """
 *         Truncates the system represented in the DS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.truncate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/DS.pyx":459
 *         CHKERR( DSTruncate(self.ds, val) )
 * 
 *     def updateExtraRow(self):             # <<<<<<<<<<<<<<
 *         """
 *         Performs all necessary operations so that the extra
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2DS_50updateExtraRow[] = "DS.updateExtraRow(self)\n\n        Performs all necessary operations so that the extra\n        row gets up-to-date after a call to `solve()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateExtraRow (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("updateExtraRow", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "updateExtraRow", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(((struct PySlepcDSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2DS_50updateExtraRow(struct PySlepcDSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("updateExtraRow", 0);

  /* "SLEPc/DS.pyx":464
 *         row gets up-to-date after a call to `solve()`.
 *         """
 *         CHKERR( DSUpdateExtraRow(self.ds) )             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(DSUpdateExtraRow(__pyx_v_self->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(10, 464, __pyx_L1_error)

  /* "SLEPc/DS.pyx":459
 *         CHKERR( DSTruncate(self.ds, val) )
 * 
 *     def updateExtraRow(self):             # <<<<<<<<<<<<<<
 *         """
 *         Performs all necessary operations so that the extra
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.DS.updateExtraRow", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":40
 *     CombineType = FNCombineType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.fn
 *         self.fn = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(((struct PySlepcFNObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_2FN___cinit__(struct PySlepcFNObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/FN.pyx":41
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.fn             # <<<<<<<<<<<<<<
 *         self.fn = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->fn));

  /* "SLEPc/FN.pyx":42
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.fn
 *         self.fn = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->fn = NULL;

  /* "SLEPc/FN.pyx":40
 *     CombineType = FNCombineType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.fn
 *         self.fn = NULL
 */

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

/* "SLEPc/FN.pyx":44
 *         self.fn = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the FN data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_2view[] = "FN.view(self, Viewer viewer=None)\n\n        Prints the FN data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(11, 44, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 44, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(11, 44, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_2view(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_2view(struct PySlepcFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/FN.pyx":54
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( FNView(self.fn, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/FN.pyx":55
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( FNView(self.fn, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/FN.pyx":56
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( FNView(self.fn, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNView(__pyx_v_self->fn, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(11, 56, __pyx_L1_error)

  /* "SLEPc/FN.pyx":44
 *         self.fn = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the FN data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":58
 *         CHKERR( FNView(self.fn, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the FN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_4destroy[] = "FN.destroy(self)\n\n        Destroys the FN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(((struct PySlepcFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_4destroy(struct PySlepcFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/FN.pyx":62
 *         Destroys the FN object.
 *         """
 *         CHKERR( FNDestroy(&self.fn) )             # <<<<<<<<<<<<<<
 *         self.fn = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNDestroy((&__pyx_v_self->fn))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 62, __pyx_L1_error)

  /* "SLEPc/FN.pyx":63
 *         """
 *         CHKERR( FNDestroy(&self.fn) )
 *         self.fn = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->fn = NULL;

  /* "SLEPc/FN.pyx":64
 *         CHKERR( FNDestroy(&self.fn) )
 *         self.fn = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":58
 *         CHKERR( FNView(self.fn, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the FN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":66
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the FN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_6create[] = "FN.create(self, comm=None)\n\n        Creates the FN object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(11, 66, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 66, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_6create(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_6create(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  FN __pyx_v_newfn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/FN.pyx":76
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcFN newfn = NULL
 *         CHKERR( FNCreate(ccomm, &newfn) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 76, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/FN.pyx":77
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcFN newfn = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( FNCreate(ccomm, &newfn) )
 *         SlepcCLEAR(self.obj); self.fn = newfn
 */
  __pyx_v_newfn = NULL;

  /* "SLEPc/FN.pyx":78
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcFN newfn = NULL
 *         CHKERR( FNCreate(ccomm, &newfn) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.fn = newfn
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNCreate(__pyx_v_ccomm, (&__pyx_v_newfn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 78, __pyx_L1_error)

  /* "SLEPc/FN.pyx":79
 *         cdef SlepcFN newfn = NULL
 *         CHKERR( FNCreate(ccomm, &newfn) )
 *         SlepcCLEAR(self.obj); self.fn = newfn             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->fn = __pyx_v_newfn;

  /* "SLEPc/FN.pyx":80
 *         CHKERR( FNCreate(ccomm, &newfn) )
 *         SlepcCLEAR(self.obj); self.fn = newfn
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, fn_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":66
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the FN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":82
 *         return self
 * 
 *     def setType(self, fn_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the FN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_8setType[] = "FN.setType(self, fn_type)\n\n        Selects the type for the FN object.\n\n        Parameters\n        ----------\n        fn_type: `FN.Type` enumerate\n                  The inner product type to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fn_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fn_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(11, 82, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_fn_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 82, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_8setType(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_fn_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_8setType(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_fn_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_fn_type);

  /* "SLEPc/FN.pyx":91
 *                   The inner product type to be used.
 *         """
 *         cdef SlepcFNType cval = NULL             # <<<<<<<<<<<<<<
 *         fn_type = str2bytes(fn_type, &cval)
 *         CHKERR( FNSetType(self.fn, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/FN.pyx":92
 *         """
 *         cdef SlepcFNType cval = NULL
 *         fn_type = str2bytes(fn_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( FNSetType(self.fn, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_fn_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_fn_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/FN.pyx":93
 *         cdef SlepcFNType cval = NULL
 *         fn_type = str2bytes(fn_type, &cval)
 *         CHKERR( FNSetType(self.fn, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetType(__pyx_v_self->fn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 93, __pyx_L1_error)

  /* "SLEPc/FN.pyx":82
 *         return self
 * 
 *     def setType(self, fn_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the FN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fn_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":95
 *         CHKERR( FNSetType(self.fn, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the FN type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_10getType[] = "FN.getType(self)\n\n        Gets the FN type of this object.\n\n        Returns\n        -------\n        type: `FN.Type` enumerate\n              The inner product type currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_10getType(((struct PySlepcFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_10getType(struct PySlepcFNObject *__pyx_v_self) {
  const char* __pyx_v_fn_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/FN.pyx":104
 *               The inner product type currently being used.
 *         """
 *         cdef SlepcFNType fn_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( FNGetType(self.fn, &fn_type) )
 *         return bytes2str(fn_type)
 */
  __pyx_v_fn_type = NULL;

  /* "SLEPc/FN.pyx":105
 *         """
 *         cdef SlepcFNType fn_type = NULL
 *         CHKERR( FNGetType(self.fn, &fn_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(fn_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetType(__pyx_v_self->fn, (&__pyx_v_fn_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 105, __pyx_L1_error)

  /* "SLEPc/FN.pyx":106
 *         cdef SlepcFNType fn_type = NULL
 *         CHKERR( FNGetType(self.fn, &fn_type) )
 *         return bytes2str(fn_type)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_fn_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":95
 *         CHKERR( FNSetType(self.fn, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the FN type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":108
 *         return bytes2str(fn_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all FN options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_12setOptionsPrefix[] = "FN.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all FN options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all FN option\n                requests.\n\n        Notes\n        -----\n        A hyphen (``-``) must NOT be given at the beginning of the\n        prefix name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(11, 108, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 108, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_12setOptionsPrefix(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/FN.pyx":125
 *         AUTOMATICALLY the hyphen.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( FNSetOptionsPrefix(self.fn, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/FN.pyx":126
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( FNSetOptionsPrefix(self.fn, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/FN.pyx":127
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( FNSetOptionsPrefix(self.fn, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetOptionsPrefix(__pyx_v_self->fn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 127, __pyx_L1_error)

  /* "SLEPc/FN.pyx":108
 *         return bytes2str(fn_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all FN options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":129
 *         CHKERR( FNSetOptionsPrefix(self.fn, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all FN options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_14getOptionsPrefix[] = "FN.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all FN options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this FN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(((struct PySlepcFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_14getOptionsPrefix(struct PySlepcFNObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/FN.pyx":139
 *                 The prefix string set for this FN object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( FNGetOptionsPrefix(self.fn, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/FN.pyx":140
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( FNGetOptionsPrefix(self.fn, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetOptionsPrefix(__pyx_v_self->fn, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 140, __pyx_L1_error)

  /* "SLEPc/FN.pyx":141
 *         cdef const_char *prefix = NULL
 *         CHKERR( FNGetOptionsPrefix(self.fn, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":129
 *         CHKERR( FNSetOptionsPrefix(self.fn, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all FN options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":143
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets FN options from the options database.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_16setFromOptions[] = "FN.setFromOptions(self)\n\n        Sets FN options from the options database.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(((struct PySlepcFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_16setFromOptions(struct PySlepcFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/FN.pyx":152
 *         option.
 *         """
 *         CHKERR( FNSetFromOptions(self.fn) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetFromOptions(__pyx_v_self->fn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 152, __pyx_L1_error)

  /* "SLEPc/FN.pyx":143
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets FN options from the options database.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":156
 *     #
 * 
 *     def evaluateFunction(self, x):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the value of the function f(x) for a given x.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_18evaluateFunction[] = "FN.evaluateFunction(self, x)\n\n        Computes the value of the function f(x) for a given x.\n\n        Parameters\n        ----------\n        x: scalar\n            Value where the function must be evaluated.\n\n        Returns\n        -------\n        y: scalar\n            The result of f(x).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("evaluateFunction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluateFunction") < 0)) __PYX_ERR(11, 156, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("evaluateFunction", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 156, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_x);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_18evaluateFunction(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("evaluateFunction", 0);

  /* "SLEPc/FN.pyx":170
 *             The result of f(x).
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( FNEvaluateFunction(self.fn, x, &sval) )
 *         return toScalar(sval)
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/FN.pyx":171
 *         """
 *         cdef PetscScalar sval = 0
 *         CHKERR( FNEvaluateFunction(self.fn, x, &sval) )             # <<<<<<<<<<<<<<
 *         return toScalar(sval)
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_1 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(11, 171, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNEvaluateFunction(__pyx_v_self->fn, __pyx_t_1, (&__pyx_v_sval))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 171, __pyx_L1_error)

  /* "SLEPc/FN.pyx":172
 *         cdef PetscScalar sval = 0
 *         CHKERR( FNEvaluateFunction(self.fn, x, &sval) )
 *         return toScalar(sval)             # <<<<<<<<<<<<<<
 * 
 *     def evaluateDerivative(self, x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":156
 *     #
 * 
 *     def evaluateFunction(self, x):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the value of the function f(x) for a given x.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":174
 *         return toScalar(sval)
 * 
 *     def evaluateDerivative(self, x):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the value of the derivative f'(x) for a given x.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_20evaluateDerivative[] = "FN.evaluateDerivative(self, x)\n\n        Computes the value of the derivative f'(x) for a given x.\n\n        Parameters\n        ----------\n        x: scalar\n            Value where the derivative must be evaluated.\n\n        Returns\n        -------\n        y: scalar\n            The result of f'(x).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("evaluateDerivative (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluateDerivative") < 0)) __PYX_ERR(11, 174, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("evaluateDerivative", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 174, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateDerivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_x);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_20evaluateDerivative(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("evaluateDerivative", 0);

  /* "SLEPc/FN.pyx":188
 *             The result of f'(x).
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( FNEvaluateDerivative(self.fn, x, &sval) )
 *         return toScalar(sval)
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/FN.pyx":189
 *         """
 *         cdef PetscScalar sval = 0
 *         CHKERR( FNEvaluateDerivative(self.fn, x, &sval) )             # <<<<<<<<<<<<<<
 *         return toScalar(sval)
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_1 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(11, 189, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNEvaluateDerivative(__pyx_v_self->fn, __pyx_t_1, (&__pyx_v_sval))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 189, __pyx_L1_error)

  /* "SLEPc/FN.pyx":190
 *         cdef PetscScalar sval = 0
 *         CHKERR( FNEvaluateDerivative(self.fn, x, &sval) )
 *         return toScalar(sval)             # <<<<<<<<<<<<<<
 * 
 *     def setScale(self, alpha=None, beta=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":174
 *         return toScalar(sval)
 * 
 *     def evaluateDerivative(self, x):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the value of the derivative f'(x) for a given x.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.evaluateDerivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":192
 *         return toScalar(sval)
 * 
 *     def setScale(self, alpha=None, beta=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the scaling parameters that define the matematical function.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_22setScale[] = "FN.setScale(self, alpha=None, beta=None)\n\n        Sets the scaling parameters that define the matematical function.\n\n        Parameters\n        ----------\n        alpha: scalar (possibly complex)\n               inner scaling (argument).\n        beta: scalar (possibly complex)\n               outer scaling (result).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_v_beta = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setScale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,&__pyx_n_s_beta,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beta);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScale") < 0)) __PYX_ERR(11, 192, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_alpha = values[0];
    __pyx_v_beta = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setScale", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 192, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha, __pyx_v_beta);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_22setScale(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_beta) {
  PetscScalar __pyx_v_aval;
  PetscScalar __pyx_v_bval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscScalar __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setScale", 0);

  /* "SLEPc/FN.pyx":203
 *                outer scaling (result).
 *         """
 *         cdef PetscScalar aval = 1.0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar bval = 1.0
 *         if alpha is not None: aval = asScalar(alpha)
 */
  __pyx_v_aval = 1.0;

  /* "SLEPc/FN.pyx":204
 *         """
 *         cdef PetscScalar aval = 1.0
 *         cdef PetscScalar bval = 1.0             # <<<<<<<<<<<<<<
 *         if alpha is not None: aval = asScalar(alpha)
 *         if beta  is not None: bval = asScalar(beta)
 */
  __pyx_v_bval = 1.0;

  /* "SLEPc/FN.pyx":205
 *         cdef PetscScalar aval = 1.0
 *         cdef PetscScalar bval = 1.0
 *         if alpha is not None: aval = asScalar(alpha)             # <<<<<<<<<<<<<<
 *         if beta  is not None: bval = asScalar(beta)
 *         CHKERR( FNSetScale(self.fn, aval, bval) )
 */
  __pyx_t_1 = (__pyx_v_alpha != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_alpha); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 205, __pyx_L1_error)
    __pyx_v_aval = __pyx_t_3;
  }

  /* "SLEPc/FN.pyx":206
 *         cdef PetscScalar bval = 1.0
 *         if alpha is not None: aval = asScalar(alpha)
 *         if beta  is not None: bval = asScalar(beta)             # <<<<<<<<<<<<<<
 *         CHKERR( FNSetScale(self.fn, aval, bval) )
 * 
 */
  __pyx_t_2 = (__pyx_v_beta != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_beta); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 206, __pyx_L1_error)
    __pyx_v_bval = __pyx_t_3;
  }

  /* "SLEPc/FN.pyx":207
 *         if alpha is not None: aval = asScalar(alpha)
 *         if beta  is not None: bval = asScalar(beta)
 *         CHKERR( FNSetScale(self.fn, aval, bval) )             # <<<<<<<<<<<<<<
 * 
 *     def getScale(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNSetScale(__pyx_v_self->fn, __pyx_v_aval, __pyx_v_bval)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(11, 207, __pyx_L1_error)

  /* "SLEPc/FN.pyx":192
 *         return toScalar(sval)
 * 
 *     def setScale(self, alpha=None, beta=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the scaling parameters that define the matematical function.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":209
 *         CHKERR( FNSetScale(self.fn, aval, bval) )
 * 
 *     def getScale(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the scaling parameters that define the matematical function.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_24getScale[] = "FN.getScale(self)\n\n        Gets the scaling parameters that define the matematical function.\n\n        Returns\n        -------\n        alpha: scalar (possibly complex)\n               inner scaling (argument).\n        beta: scalar (possibly complex)\n               outer scaling (result).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getScale (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getScale", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getScale", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(((struct PySlepcFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_24getScale(struct PySlepcFNObject *__pyx_v_self) {
  PetscScalar __pyx_v_aval;
  PetscScalar __pyx_v_bval;
  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;
  __Pyx_RefNannySetupContext("getScale", 0);

  /* "SLEPc/FN.pyx":220
 *                outer scaling (result).
 *         """
 *         cdef PetscScalar aval = 0, bval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( FNGetScale(self.fn, &aval, &bval) )
 *         return (toScalar(aval), toScalar(bval))
 */
  __pyx_v_aval = 0.0;
  __pyx_v_bval = 0.0;

  /* "SLEPc/FN.pyx":221
 *         """
 *         cdef PetscScalar aval = 0, bval = 0
 *         CHKERR( FNGetScale(self.fn, &aval, &bval) )             # <<<<<<<<<<<<<<
 *         return (toScalar(aval), toScalar(bval))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNGetScale(__pyx_v_self->fn, (&__pyx_v_aval), (&__pyx_v_bval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(11, 221, __pyx_L1_error)

  /* "SLEPc/FN.pyx":222
 *         cdef PetscScalar aval = 0, bval = 0
 *         CHKERR( FNGetScale(self.fn, &aval, &bval) )
 *         return (toScalar(aval), toScalar(bval))             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_aval); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_bval); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/FN.pyx":209
 *         CHKERR( FNSetScale(self.fn, aval, bval) )
 * 
 *     def getScale(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the scaling parameters that define the matematical function.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":226
 *     #
 * 
 *     def setRationalNumerator(self, alpha not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the coefficients of the numerator of the rational function.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_26setRationalNumerator[] = "FN.setRationalNumerator(self, alpha)\n\n        Sets the coefficients of the numerator of the rational function.\n\n        Parameters\n        ----------\n        alpha: array of scalars\n            Coefficients.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRationalNumerator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRationalNumerator") < 0)) __PYX_ERR(11, 226, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_alpha = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRationalNumerator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalNumerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_alpha) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "alpha"); __PYX_ERR(11, 226, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_26setRationalNumerator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha) {
  PetscInt __pyx_v_na;
  PetscScalar *__pyx_v_a;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setRationalNumerator", 0);

  /* "SLEPc/FN.pyx":235
 *             Coefficients.
 *         """
 *         cdef PetscInt na = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 */
  __pyx_v_na = 0;

  /* "SLEPc/FN.pyx":236
 *         """
 *         cdef PetscInt na = 0
 *         cdef PetscScalar *a = NULL             # <<<<<<<<<<<<<<
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 *         CHKERR( FNRationalSetNumerator(self.fn, na, a) )
 */
  __pyx_v_a = NULL;

  /* "SLEPc/FN.pyx":237
 *         cdef PetscInt na = 0
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)             # <<<<<<<<<<<<<<
 *         CHKERR( FNRationalSetNumerator(self.fn, na, a) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_alpha, (&__pyx_v_na), (&__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/FN.pyx":238
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 *         CHKERR( FNRationalSetNumerator(self.fn, na, a) )             # <<<<<<<<<<<<<<
 * 
 *     def setRationalDenominator(self, alpha not None):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetNumerator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 238, __pyx_L1_error)

  /* "SLEPc/FN.pyx":226
 *     #
 * 
 *     def setRationalNumerator(self, alpha not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the coefficients of the numerator of the rational function.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalNumerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/FN.pyx":240
 *         CHKERR( FNRationalSetNumerator(self.fn, na, a) )
 * 
 *     def setRationalDenominator(self, alpha not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the coefficients of the denominator of the rational function.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2FN_28setRationalDenominator[] = "FN.setRationalDenominator(self, alpha)\n\n        Sets the coefficients of the denominator of the rational function.\n\n        Parameters\n        ----------\n        alpha: array of scalars\n            Coefficients.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_alpha = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRationalDenominator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alpha,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRationalDenominator") < 0)) __PYX_ERR(11, 240, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_alpha = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRationalDenominator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(11, 240, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalDenominator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_alpha) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "alpha"); __PYX_ERR(11, 240, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(((struct PySlepcFNObject *)__pyx_v_self), __pyx_v_alpha);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2FN_28setRationalDenominator(struct PySlepcFNObject *__pyx_v_self, PyObject *__pyx_v_alpha) {
  PetscInt __pyx_v_na;
  PetscScalar *__pyx_v_a;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setRationalDenominator", 0);

  /* "SLEPc/FN.pyx":249
 *             Coefficients.
 *         """
 *         cdef PetscInt na = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 */
  __pyx_v_na = 0;

  /* "SLEPc/FN.pyx":250
 *         """
 *         cdef PetscInt na = 0
 *         cdef PetscScalar *a = NULL             # <<<<<<<<<<<<<<
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 *         CHKERR( FNRationalSetDenominator(self.fn, na, a) )
 */
  __pyx_v_a = NULL;

  /* "SLEPc/FN.pyx":251
 *         cdef PetscInt na = 0
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)             # <<<<<<<<<<<<<<
 *         CHKERR( FNRationalSetDenominator(self.fn, na, a) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_iarray_s(__pyx_v_alpha, (&__pyx_v_na), (&__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/FN.pyx":252
 *         cdef PetscScalar *a = NULL
 *         cdef object tmp1 = iarray_s(alpha, &na, &a)
 *         CHKERR( FNRationalSetDenominator(self.fn, na, a) )             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(FNRationalSetDenominator(__pyx_v_self->fn, __pyx_v_na, __pyx_v_a)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(11, 252, __pyx_L1_error)

  /* "SLEPc/FN.pyx":240
 *         CHKERR( FNRationalSetNumerator(self.fn, na, a) )
 * 
 *     def setRationalDenominator(self, alpha not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the coefficients of the denominator of the rational function.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.FN.setRationalDenominator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":22
 *     Type             = RGType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.rg
 *         self.rg = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(((struct PySlepcRGObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_2RG___cinit__(struct PySlepcRGObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/RG.pyx":23
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.rg             # <<<<<<<<<<<<<<
 *         self.rg = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->rg));

  /* "SLEPc/RG.pyx":24
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.rg
 *         self.rg = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->rg = NULL;

  /* "SLEPc/RG.pyx":22
 *     Type             = RGType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.rg
 *         self.rg = NULL
 */

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

/* "SLEPc/RG.pyx":26
 *         self.rg = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the RG data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_2view[] = "RG.view(self, Viewer viewer=None)\n\n        Prints the RG data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(12, 26, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 26, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(12, 26, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_2view(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_2view(struct PySlepcRGObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/RG.pyx":36
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( RGView(self.rg, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/RG.pyx":37
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( RGView(self.rg, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/RG.pyx":38
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( RGView(self.rg, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGView(__pyx_v_self->rg, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(12, 38, __pyx_L1_error)

  /* "SLEPc/RG.pyx":26
 *         self.rg = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the RG data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":40
 *         CHKERR( RGView(self.rg, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the RG object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_4destroy[] = "RG.destroy(self)\n\n        Destroys the RG object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_4destroy(struct PySlepcRGObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/RG.pyx":44
 *         Destroys the RG object.
 *         """
 *         CHKERR( RGDestroy(&self.rg) )             # <<<<<<<<<<<<<<
 *         self.rg = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGDestroy((&__pyx_v_self->rg))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 44, __pyx_L1_error)

  /* "SLEPc/RG.pyx":45
 *         """
 *         CHKERR( RGDestroy(&self.rg) )
 *         self.rg = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->rg = NULL;

  /* "SLEPc/RG.pyx":46
 *         CHKERR( RGDestroy(&self.rg) )
 *         self.rg = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":40
 *         CHKERR( RGView(self.rg, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the RG object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":48
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the RG object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_6create[] = "RG.create(self, comm=None)\n\n        Creates the RG object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_7create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(12, 48, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 48, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_6create(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_6create(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  RG __pyx_v_newrg;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/RG.pyx":58
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcRG newrg = NULL
 *         CHKERR( RGCreate(ccomm, &newrg) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 58, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/RG.pyx":59
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcRG newrg = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( RGCreate(ccomm, &newrg) )
 *         SlepcCLEAR(self.obj); self.rg = newrg
 */
  __pyx_v_newrg = NULL;

  /* "SLEPc/RG.pyx":60
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcRG newrg = NULL
 *         CHKERR( RGCreate(ccomm, &newrg) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.rg = newrg
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGCreate(__pyx_v_ccomm, (&__pyx_v_newrg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 60, __pyx_L1_error)

  /* "SLEPc/RG.pyx":61
 *         cdef SlepcRG newrg = NULL
 *         CHKERR( RGCreate(ccomm, &newrg) )
 *         SlepcCLEAR(self.obj); self.rg = newrg             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->rg = __pyx_v_newrg;

  /* "SLEPc/RG.pyx":62
 *         CHKERR( RGCreate(ccomm, &newrg) )
 *         SlepcCLEAR(self.obj); self.rg = newrg
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, rg_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":48
 *         return self
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the RG object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":64
 *         return self
 * 
 *     def setType(self, rg_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the RG object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_8setType[] = "RG.setType(self, rg_type)\n\n        Selects the type for the RG object.\n\n        Parameters\n        ----------\n        rg_type: `RG.Type` enumerate\n                  The inner product type to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_9setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_rg_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(12, 64, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_rg_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 64, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_8setType(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_rg_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_8setType(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_rg_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_rg_type);

  /* "SLEPc/RG.pyx":73
 *                   The inner product type to be used.
 *         """
 *         cdef SlepcRGType cval = NULL             # <<<<<<<<<<<<<<
 *         rg_type = str2bytes(rg_type, &cval)
 *         CHKERR( RGSetType(self.rg, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/RG.pyx":74
 *         """
 *         cdef SlepcRGType cval = NULL
 *         rg_type = str2bytes(rg_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( RGSetType(self.rg, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_rg_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_rg_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/RG.pyx":75
 *         cdef SlepcRGType cval = NULL
 *         rg_type = str2bytes(rg_type, &cval)
 *         CHKERR( RGSetType(self.rg, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetType(__pyx_v_self->rg, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 75, __pyx_L1_error)

  /* "SLEPc/RG.pyx":64
 *         return self
 * 
 *     def setType(self, rg_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the type for the RG object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_rg_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":77
 *         CHKERR( RGSetType(self.rg, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the RG type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_10getType[] = "RG.getType(self)\n\n        Gets the RG type of this object.\n\n        Returns\n        -------\n        type: `RG.Type` enumerate\n              The inner product type currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_11getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_10getType(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_10getType(struct PySlepcRGObject *__pyx_v_self) {
  const char* __pyx_v_rg_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/RG.pyx":86
 *               The inner product type currently being used.
 *         """
 *         cdef SlepcRGType rg_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( RGGetType(self.rg, &rg_type) )
 *         return bytes2str(rg_type)
 */
  __pyx_v_rg_type = NULL;

  /* "SLEPc/RG.pyx":87
 *         """
 *         cdef SlepcRGType rg_type = NULL
 *         CHKERR( RGGetType(self.rg, &rg_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(rg_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetType(__pyx_v_self->rg, (&__pyx_v_rg_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 87, __pyx_L1_error)

  /* "SLEPc/RG.pyx":88
 *         cdef SlepcRGType rg_type = NULL
 *         CHKERR( RGGetType(self.rg, &rg_type) )
 *         return bytes2str(rg_type)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_rg_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":77
 *         CHKERR( RGSetType(self.rg, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the RG type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":90
 *         return bytes2str(rg_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all RG options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_12setOptionsPrefix[] = "RG.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all RG options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all RG option\n                requests.\n\n        Notes\n        -----\n        A hyphen (``-``) must NOT be given at the beginning of the\n        prefix name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(12, 90, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 90, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_12setOptionsPrefix(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/RG.pyx":107
 *         AUTOMATICALLY the hyphen.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( RGSetOptionsPrefix(self.rg, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/RG.pyx":108
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( RGSetOptionsPrefix(self.rg, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/RG.pyx":109
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( RGSetOptionsPrefix(self.rg, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetOptionsPrefix(__pyx_v_self->rg, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 109, __pyx_L1_error)

  /* "SLEPc/RG.pyx":90
 *         return bytes2str(rg_type)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all RG options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":111
 *         CHKERR( RGSetOptionsPrefix(self.rg, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all RG options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_14getOptionsPrefix[] = "RG.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all RG options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this RG object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_14getOptionsPrefix(struct PySlepcRGObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/RG.pyx":121
 *                 The prefix string set for this RG object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( RGGetOptionsPrefix(self.rg, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/RG.pyx":122
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( RGGetOptionsPrefix(self.rg, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetOptionsPrefix(__pyx_v_self->rg, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 122, __pyx_L1_error)

  /* "SLEPc/RG.pyx":123
 *         cdef const_char *prefix = NULL
 *         CHKERR( RGGetOptionsPrefix(self.rg, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":111
 *         CHKERR( RGSetOptionsPrefix(self.rg, cval) )
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all RG options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":125
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets RG options from the options database.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_16setFromOptions[] = "RG.setFromOptions(self)\n\n        Sets RG options from the options database.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_16setFromOptions(struct PySlepcRGObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/RG.pyx":134
 *         option.
 *         """
 *         CHKERR( RGSetFromOptions(self.rg) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetFromOptions(__pyx_v_self->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 134, __pyx_L1_error)

  /* "SLEPc/RG.pyx":125
 *         return bytes2str(prefix)
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets RG options from the options database.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":138
 *     #
 * 
 *     def isTrivial(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether it is the trivial region (whole complex plane).
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_18isTrivial[] = "RG.isTrivial(self)\n\n        Tells whether it is the trivial region (whole complex plane).\n\n        Returns\n        -------\n        flag: boolean\n             True if the region is equal to the whole complex plane, e.g.,\n             an interval region with all four endpoints unbounded or an\n             ellipse with infinite radius.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isTrivial (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("isTrivial", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isTrivial", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_18isTrivial(struct PySlepcRGObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("isTrivial", 0);

  /* "SLEPc/RG.pyx":149
 *              ellipse with infinite radius.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( RGIsTrivial(self.rg, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/RG.pyx":150
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( RGIsTrivial(self.rg, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIsTrivial(__pyx_v_self->rg, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 150, __pyx_L1_error)

  /* "SLEPc/RG.pyx":151
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( RGIsTrivial(self.rg, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def getComplement(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":138
 *     #
 * 
 *     def isTrivial(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether it is the trivial region (whole complex plane).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.isTrivial", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":153
 *         return <bint> tval
 * 
 *     def getComplement(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether the region is complemented or not.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_20getComplement[] = "RG.getComplement(self)\n\n        Returns the flag indicating whether the region is complemented or not.\n\n        Returns\n        -------\n        flg: bool\n            Whether the region is complemented or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getComplement (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getComplement", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getComplement", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_20getComplement(struct PySlepcRGObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getComplement", 0);

  /* "SLEPc/RG.pyx":162
 *             Whether the region is complemented or not.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( RGGetComplement(self.rg, &tval) )
 *         return <bint>tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/RG.pyx":163
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( RGGetComplement(self.rg, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint>tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGGetComplement(__pyx_v_self->rg, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 163, __pyx_L1_error)

  /* "SLEPc/RG.pyx":164
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( RGGetComplement(self.rg, &tval) )
 *         return <bint>tval             # <<<<<<<<<<<<<<
 * 
 *     def setComplement(self, comp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":153
 *         return <bint> tval
 * 
 *     def getComplement(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether the region is complemented or not.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.getComplement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":166
 *         return <bint>tval
 * 
 *     def setComplement(self, comp):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that the region is the complement
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_22setComplement[] = "RG.setComplement(self, comp)\n\n        Sets a flag to indicate that the region is the complement\n        of the specified one.\n\n        Parameters\n        ----------\n        comp: bool\n            Activate/deactivate the complementation of the region.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comp = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setComplement (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comp,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comp)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setComplement") < 0)) __PYX_ERR(12, 166, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_comp = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setComplement", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setComplement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_comp);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_22setComplement(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_comp) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setComplement", 0);

  /* "SLEPc/RG.pyx":176
 *             Activate/deactivate the complementation of the region.
 *         """
 *         cdef PetscBool tval = comp             # <<<<<<<<<<<<<<
 *         CHKERR( RGSetComplement(self.rg, tval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_comp)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 176, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_1;

  /* "SLEPc/RG.pyx":177
 *         """
 *         cdef PetscBool tval = comp
 *         CHKERR( RGSetComplement(self.rg, tval) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGSetComplement(__pyx_v_self->rg, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 177, __pyx_L1_error)

  /* "SLEPc/RG.pyx":166
 *         return <bint>tval
 * 
 *     def setComplement(self, comp):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to indicate that the region is the complement
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setComplement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":181
 *     #
 * 
 *     def setEllipseParameters(self, center, radius, vscale):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the parameters defining the ellipse region.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_24setEllipseParameters[] = "RG.setEllipseParameters(self, center, radius, vscale)\n\n        Sets the parameters defining the ellipse region.\n\n        Parameters\n        ----------\n        center: float (real or complex)\n              The center.\n        radius: float\n              The radius.\n        vscale: float\n              The vertical scale.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_center = 0;
  PyObject *__pyx_v_radius = 0;
  PyObject *__pyx_v_vscale = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setEllipseParameters (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_center,&__pyx_n_s_radius,&__pyx_n_s_vscale,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_center)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 1); __PYX_ERR(12, 181, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_vscale)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, 2); __PYX_ERR(12, 181, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setEllipseParameters") < 0)) __PYX_ERR(12, 181, __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_center = values[0];
    __pyx_v_radius = values[1];
    __pyx_v_vscale = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setEllipseParameters", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 181, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_center, __pyx_v_radius, __pyx_v_vscale);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_24setEllipseParameters(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_radius, PyObject *__pyx_v_vscale) {
  PetscScalar __pyx_v_sval;
  PetscReal __pyx_v_val1;
  PetscReal __pyx_v_val2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  PetscReal __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("setEllipseParameters", 0);

  /* "SLEPc/RG.pyx":194
 *               The vertical scale.
 *         """
 *         cdef PetscScalar sval = asScalar(center)             # <<<<<<<<<<<<<<
 *         cdef PetscReal val1 = radius
 *         cdef PetscReal val2 = vscale
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_center); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 194, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/RG.pyx":195
 *         """
 *         cdef PetscScalar sval = asScalar(center)
 *         cdef PetscReal val1 = radius             # <<<<<<<<<<<<<<
 *         cdef PetscReal val2 = vscale
 *         CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) )
 */
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_radius); if (unlikely((__pyx_t_2 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 195, __pyx_L1_error)
  __pyx_v_val1 = __pyx_t_2;

  /* "SLEPc/RG.pyx":196
 *         cdef PetscScalar sval = asScalar(center)
 *         cdef PetscReal val1 = radius
 *         cdef PetscReal val2 = vscale             # <<<<<<<<<<<<<<
 *         CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) )
 * 
 */
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_vscale); if (unlikely((__pyx_t_2 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 196, __pyx_L1_error)
  __pyx_v_val2 = __pyx_t_2;

  /* "SLEPc/RG.pyx":197
 *         cdef PetscReal val1 = radius
 *         cdef PetscReal val2 = vscale
 *         CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) )             # <<<<<<<<<<<<<<
 * 
 *     def getEllipseParameters(self):
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGEllipseSetParameters(__pyx_v_self->rg, __pyx_v_sval, __pyx_v_val1, __pyx_v_val2)); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(12, 197, __pyx_L1_error)

  /* "SLEPc/RG.pyx":181
 *     #
 * 
 *     def setEllipseParameters(self, center, radius, vscale):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the parameters defining the ellipse region.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":199
 *         CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) )
 * 
 *     def getEllipseParameters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the parameters that define the ellipse region.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_26getEllipseParameters[] = "RG.getEllipseParameters(self)\n\n        Gets the parameters that define the ellipse region.\n\n        Returns\n        -------\n        center: float (real or complex)\n              The center.\n        radius: float\n              The radius.\n        vscale: float\n              The vertical scale.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEllipseParameters (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getEllipseParameters", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getEllipseParameters", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_26getEllipseParameters(struct PySlepcRGObject *__pyx_v_self) {
  PetscScalar __pyx_v_sval;
  PetscReal __pyx_v_val1;
  PetscReal __pyx_v_val2;
  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;
  __Pyx_RefNannySetupContext("getEllipseParameters", 0);

  /* "SLEPc/RG.pyx":212
 *               The vertical scale.
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal val1 = 0
 *         cdef PetscReal val2 = 0
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/RG.pyx":213
 *         """
 *         cdef PetscScalar sval = 0
 *         cdef PetscReal val1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal val2 = 0
 *         CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) )
 */
  __pyx_v_val1 = 0.0;

  /* "SLEPc/RG.pyx":214
 *         cdef PetscScalar sval = 0
 *         cdef PetscReal val1 = 0
 *         cdef PetscReal val2 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) )
 *         return (toScalar(sval), toReal(val1), toReal(val2))
 */
  __pyx_v_val2 = 0.0;

  /* "SLEPc/RG.pyx":215
 *         cdef PetscReal val1 = 0
 *         cdef PetscReal val2 = 0
 *         CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) )             # <<<<<<<<<<<<<<
 *         return (toScalar(sval), toReal(val1), toReal(val2))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGEllipseGetParameters(__pyx_v_self->rg, (&__pyx_v_sval), (&__pyx_v_val1), (&__pyx_v_val2))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 215, __pyx_L1_error)

  /* "SLEPc/RG.pyx":216
 *         cdef PetscReal val2 = 0
 *         CHKERR( RGEllipseGetParameters(self.rg, &sval, &val1, &val2) )
 *         return (toScalar(sval), toReal(val1), toReal(val2))             # <<<<<<<<<<<<<<
 * 
 *     def setIntervalEndpoints(self, a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_val1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_val2); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":199
 *         CHKERR( RGEllipseSetParameters(self.rg, sval, val1, val2) )
 * 
 *     def getEllipseParameters(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the parameters that define the ellipse region.
 */

  /* 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_AddTraceback("slepc4py.SLEPc.RG.getEllipseParameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":218
 *         return (toScalar(sval), toReal(val1), toReal(val2))
 * 
 *     def setIntervalEndpoints(self, a, b, c, d):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the parameters defining the interval region.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints[] = "RG.setIntervalEndpoints(self, a, b, c, d)\n\n        Sets the parameters defining the interval region.\n\n        Parameters\n        ----------\n        a: float\n              The left endpoint in the real axis.\n        b: float\n              The right endpoint in the real axis.\n        c: float\n              The upper endpoint in the imaginary axis.\n        d: float\n              The lower endpoint in the imaginary axis.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_v_b = 0;
  PyObject *__pyx_v_c = 0;
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setIntervalEndpoints (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,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);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 1); __PYX_ERR(12, 218, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 2); __PYX_ERR(12, 218, __pyx_L3_error)
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, 3); __PYX_ERR(12, 218, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIntervalEndpoints") < 0)) __PYX_ERR(12, 218, __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_a = values[0];
    __pyx_v_b = values[1];
    __pyx_v_c = values[2];
    __pyx_v_d = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setIntervalEndpoints", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(12, 218, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(((struct PySlepcRGObject *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PetscReal __pyx_v_va;
  PetscReal __pyx_v_vb;
  PetscReal __pyx_v_vc;
  PetscReal __pyx_v_vd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscReal __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setIntervalEndpoints", 0);

  /* "SLEPc/RG.pyx":233
 *               The lower endpoint in the imaginary axis.
 *         """
 *         cdef PetscReal va = a             # <<<<<<<<<<<<<<
 *         cdef PetscReal vb = b
 *         cdef PetscReal vc = c
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 233, __pyx_L1_error)
  __pyx_v_va = __pyx_t_1;

  /* "SLEPc/RG.pyx":234
 *         """
 *         cdef PetscReal va = a
 *         cdef PetscReal vb = b             # <<<<<<<<<<<<<<
 *         cdef PetscReal vc = c
 *         cdef PetscReal vd = d
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 234, __pyx_L1_error)
  __pyx_v_vb = __pyx_t_1;

  /* "SLEPc/RG.pyx":235
 *         cdef PetscReal va = a
 *         cdef PetscReal vb = b
 *         cdef PetscReal vc = c             # <<<<<<<<<<<<<<
 *         cdef PetscReal vd = d
 *         CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) )
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_c); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 235, __pyx_L1_error)
  __pyx_v_vc = __pyx_t_1;

  /* "SLEPc/RG.pyx":236
 *         cdef PetscReal vb = b
 *         cdef PetscReal vc = c
 *         cdef PetscReal vd = d             # <<<<<<<<<<<<<<
 *         CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) )
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_d); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(12, 236, __pyx_L1_error)
  __pyx_v_vd = __pyx_t_1;

  /* "SLEPc/RG.pyx":237
 *         cdef PetscReal vc = c
 *         cdef PetscReal vd = d
 *         CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) )             # <<<<<<<<<<<<<<
 * 
 *     def getIntervalEndpoints(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIntervalSetEndpoints(__pyx_v_self->rg, __pyx_v_va, __pyx_v_vb, __pyx_v_vc, __pyx_v_vd)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(12, 237, __pyx_L1_error)

  /* "SLEPc/RG.pyx":218
 *         return (toScalar(sval), toReal(val1), toReal(val2))
 * 
 *     def setIntervalEndpoints(self, a, b, c, d):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the parameters defining the interval region.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.RG.setIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/RG.pyx":239
 *         CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) )
 * 
 *     def getIntervalEndpoints(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the parameters that define the interval region.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints[] = "RG.getIntervalEndpoints(self)\n\n        Gets the parameters that define the interval region.\n\n        Returns\n        -------\n        a: float\n              The left endpoint in the real axis.\n        b: float\n              The right endpoint in the real axis.\n        c: float\n              The upper endpoint in the imaginary axis.\n        d: float\n              The lower endpoint in the imaginary axis.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIntervalEndpoints (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIntervalEndpoints", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIntervalEndpoints", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(((struct PySlepcRGObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints(struct PySlepcRGObject *__pyx_v_self) {
  PetscReal __pyx_v_va;
  PetscReal __pyx_v_vb;
  PetscReal __pyx_v_vc;
  PetscReal __pyx_v_vd;
  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;
  __Pyx_RefNannySetupContext("getIntervalEndpoints", 0);

  /* "SLEPc/RG.pyx":254
 *               The lower endpoint in the imaginary axis.
 *         """
 *         cdef PetscReal va = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal vb = 0
 *         cdef PetscReal vc = 0
 */
  __pyx_v_va = 0.0;

  /* "SLEPc/RG.pyx":255
 *         """
 *         cdef PetscReal va = 0
 *         cdef PetscReal vb = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal vc = 0
 *         cdef PetscReal vd = 0
 */
  __pyx_v_vb = 0.0;

  /* "SLEPc/RG.pyx":256
 *         cdef PetscReal va = 0
 *         cdef PetscReal vb = 0
 *         cdef PetscReal vc = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal vd = 0
 *         CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) )
 */
  __pyx_v_vc = 0.0;

  /* "SLEPc/RG.pyx":257
 *         cdef PetscReal vb = 0
 *         cdef PetscReal vc = 0
 *         cdef PetscReal vd = 0             # <<<<<<<<<<<<<<
 *         CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) )
 *         return (toReal(va), toReal(vb), toReal(vc), toReal(vd))
 */
  __pyx_v_vd = 0.0;

  /* "SLEPc/RG.pyx":258
 *         cdef PetscReal vc = 0
 *         cdef PetscReal vd = 0
 *         CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) )             # <<<<<<<<<<<<<<
 *         return (toReal(va), toReal(vb), toReal(vc), toReal(vd))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(RGIntervalGetEndpoints(__pyx_v_self->rg, (&__pyx_v_va), (&__pyx_v_vb), (&__pyx_v_vc), (&__pyx_v_vd))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(12, 258, __pyx_L1_error)

  /* "SLEPc/RG.pyx":259
 *         cdef PetscReal vd = 0
 *         CHKERR( RGIntervalGetEndpoints(self.rg, &va, &vb, &vc, &vd) )
 *         return (toReal(va), toReal(vb), toReal(vc), toReal(vd))             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_va); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vb); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vc); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_vd); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(12, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "SLEPc/RG.pyx":239
 *         CHKERR( RGIntervalSetEndpoints(self.rg, va, vb, vc, vd) )
 * 
 *     def getIntervalEndpoints(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the parameters that define the interval region.
 */

  /* 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("slepc4py.SLEPc.RG.getIntervalEndpoints", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":227
 *     LanczosReorthogType = EPSLanczosReorthogType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.eps
 *         self.eps = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS___cinit__(struct PySlepcEPSObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/EPS.pyx":228
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.eps             # <<<<<<<<<<<<<<
 *         self.eps = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->eps));

  /* "SLEPc/EPS.pyx":229
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.eps
 *         self.eps = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->eps = NULL;

  /* "SLEPc/EPS.pyx":227
 *     LanczosReorthogType = EPSLanczosReorthogType
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.eps
 *         self.eps = NULL
 */

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

/* "SLEPc/EPS.pyx":231
 *         self.eps = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the EPS data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_2view[] = "EPS.view(self, Viewer viewer=None)\n\n        Prints the EPS data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional.\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(13, 231, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 231, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(13, 231, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2view(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2view(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/EPS.pyx":241
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( EPSView(self.eps, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/EPS.pyx":242
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( EPSView(self.eps, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":243
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( EPSView(self.eps, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSView(__pyx_v_self->eps, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 243, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":231
 *         self.eps = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the EPS data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":245
 *         CHKERR( EPSView(self.eps, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_4destroy[] = "EPS.destroy(self)\n\n        Destroys the EPS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_4destroy(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/EPS.pyx":249
 *         Destroys the EPS object.
 *         """
 *         CHKERR( EPSDestroy(&self.eps) )             # <<<<<<<<<<<<<<
 *         self.eps = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSDestroy((&__pyx_v_self->eps))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 249, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":250
 *         """
 *         CHKERR( EPSDestroy(&self.eps) )
 *         self.eps = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->eps = NULL;

  /* "SLEPc/EPS.pyx":251
 *         CHKERR( EPSDestroy(&self.eps) )
 *         self.eps = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":245
 *         CHKERR( EPSView(self.eps, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the EPS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":253
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_6reset[] = "EPS.reset(self)\n\n        Resets the EPS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6reset(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/EPS.pyx":257
 *         Resets the EPS object.
 *         """
 *         CHKERR( EPSReset(self.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSReset(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 257, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":253
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the EPS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":259
 *         CHKERR( EPSReset(self.eps) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_8create[] = "EPS.create(self, comm=None)\n\n        Creates the EPS object.\n\n        Parameters\n        ----------\n        comm: MPI_Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(13, 259, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 259, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_8create(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_8create(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  EPS __pyx_v_neweps;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/EPS.pyx":269
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcEPS neweps = NULL
 *         CHKERR( EPSCreate(ccomm, &neweps) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 269, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/EPS.pyx":270
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcEPS neweps = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSCreate(ccomm, &neweps) )
 *         SlepcCLEAR(self.obj); self.eps = neweps
 */
  __pyx_v_neweps = NULL;

  /* "SLEPc/EPS.pyx":271
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcEPS neweps = NULL
 *         CHKERR( EPSCreate(ccomm, &neweps) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.eps = neweps
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSCreate(__pyx_v_ccomm, (&__pyx_v_neweps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 271, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":272
 *         cdef SlepcEPS neweps = NULL
 *         CHKERR( EPSCreate(ccomm, &neweps) )
 *         SlepcCLEAR(self.obj); self.eps = neweps             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->eps = __pyx_v_neweps;

  /* "SLEPc/EPS.pyx":273
 *         CHKERR( EPSCreate(ccomm, &neweps) )
 *         SlepcCLEAR(self.obj); self.eps = neweps
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, eps_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":259
 *         CHKERR( EPSReset(self.eps) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the EPS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":275
 *         return self
 * 
 *     def setType(self, eps_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_10setType[] = "EPS.setType(self, eps_type)\n\n        Selects the particular solver to be used in the EPS object.\n\n        Parameters\n        ----------\n        eps_type: `EPS.Type` enumerate\n                  The solver to be used.\n\n        Notes\n        -----\n        See `EPS.Type` for available methods. The default is\n        `EPS.Type.KRYLOVSCHUR`.  Normally, it is best to use\n        `setFromOptions()` and then set the EPS type from the options\n        database rather than by using this routine.  Using the options\n        database provides the user with maximum flexibility in\n        evaluating the different available methods.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_eps_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(13, 275, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_eps_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 275, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_eps_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10setType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_eps_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_eps_type);

  /* "SLEPc/EPS.pyx":293
 *         evaluating the different available methods.
 *         """
 *         cdef SlepcEPSType cval = NULL             # <<<<<<<<<<<<<<
 *         eps_type = str2bytes(eps_type, &cval)
 *         CHKERR( EPSSetType(self.eps, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/EPS.pyx":294
 *         """
 *         cdef SlepcEPSType cval = NULL
 *         eps_type = str2bytes(eps_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetType(self.eps, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_eps_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_eps_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":295
 *         cdef SlepcEPSType cval = NULL
 *         eps_type = str2bytes(eps_type, &cval)
 *         CHKERR( EPSSetType(self.eps, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetType(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 295, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":275
 *         return self
 * 
 *     def setType(self, eps_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the EPS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_eps_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":297
 *         CHKERR( EPSSetType(self.eps, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the EPS type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_12getType[] = "EPS.getType(self)\n\n        Gets the EPS type of this object.\n\n        Returns\n        -------\n        type: `EPS.Type` enumerate\n              The solver currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12getType(struct PySlepcEPSObject *__pyx_v_self) {
  const char* __pyx_v_eps_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/EPS.pyx":306
 *               The solver currently being used.
 *         """
 *         cdef SlepcEPSType eps_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetType(self.eps, &eps_type) )
 *         return bytes2str(eps_type)
 */
  __pyx_v_eps_type = NULL;

  /* "SLEPc/EPS.pyx":307
 *         """
 *         cdef SlepcEPSType eps_type = NULL
 *         CHKERR( EPSGetType(self.eps, &eps_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(eps_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetType(__pyx_v_self->eps, (&__pyx_v_eps_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 307, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":308
 *         cdef SlepcEPSType eps_type = NULL
 *         CHKERR( EPSGetType(self.eps, &eps_type) )
 *         return bytes2str(eps_type)             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_eps_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":297
 *         CHKERR( EPSSetType(self.eps, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the EPS type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":310
 *         return bytes2str(eps_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all EPS options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix[] = "EPS.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all EPS options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this EPS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/EPS.pyx":320
 *                 The prefix string set for this EPS object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/EPS.pyx":321
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOptionsPrefix(__pyx_v_self->eps, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 321, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":322
 *         cdef const_char *prefix = NULL
 *         CHKERR( EPSGetOptionsPrefix(self.eps, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":310
 *         return bytes2str(eps_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all EPS options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":324
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all EPS options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix[] = "EPS.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all EPS options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all EPS option\n                requests.\n\n        Notes\n        -----\n        A hyphen (-) must NOT be given at the beginning of the prefix\n        name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n\n        For example, to distinguish between the runtime options for\n        two different EPS contexts, one could call::\n\n            E1.setOptionsPrefix(\"eig1_\")\n            E2.setOptionsPrefix(\"eig2_\")\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(13, 324, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 324, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/EPS.pyx":347
 *             E2.setOptionsPrefix("eig2_")
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( EPSSetOptionsPrefix(self.eps, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/EPS.pyx":348
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetOptionsPrefix(self.eps, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":349
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( EPSSetOptionsPrefix(self.eps, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def appendOptionsPrefix(self, prefix):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetOptionsPrefix(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 349, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":324
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all EPS options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":351
 *         CHKERR( EPSSetOptionsPrefix(self.eps, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all EPS options
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix[] = "EPS.appendOptionsPrefix(self, prefix)\n\n        Appends to the prefix used for searching for all EPS options\n        in the database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all EPS option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(13, 351, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 351, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("appendOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/EPS.pyx":361
 *                 The prefix string to prepend to all EPS option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( EPSAppendOptionsPrefix(self.eps, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/EPS.pyx":362
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSAppendOptionsPrefix(self.eps, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":363
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( EPSAppendOptionsPrefix(self.eps, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSAppendOptionsPrefix(__pyx_v_self->eps, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 363, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":351
 *         CHKERR( EPSSetOptionsPrefix(self.eps, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all EPS options
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":365
 *         CHKERR( EPSAppendOptionsPrefix(self.eps, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets EPS options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_20setFromOptions[] = "EPS.setFromOptions(self)\n\n        Sets EPS options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_20setFromOptions(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/EPS.pyx":376
 *         option.
 *         """
 *         CHKERR( EPSSetFromOptions(self.eps) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetFromOptions(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 376, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":365
 *         CHKERR( EPSAppendOptionsPrefix(self.eps, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets EPS options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":380
 *     #
 * 
 *     def getProblemType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the problem type from the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_22getProblemType[] = "EPS.getProblemType(self)\n\n        Gets the problem type from the EPS object.\n\n        Returns\n        -------\n        problem_type: `EPS.ProblemType` enumerate\n                      The problem type that was previously set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getProblemType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getProblemType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getProblemType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_22getProblemType(struct PySlepcEPSObject *__pyx_v_self) {
  EPSProblemType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getProblemType", 0);

  /* "SLEPc/EPS.pyx":389
 *                       The problem type that was previously set.
 *         """
 *         cdef SlepcEPSProblemType val = EPS_NHEP             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetProblemType(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_NHEP;

  /* "SLEPc/EPS.pyx":390
 *         """
 *         cdef SlepcEPSProblemType val = EPS_NHEP
 *         CHKERR( EPSGetProblemType(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetProblemType(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 390, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":391
 *         cdef SlepcEPSProblemType val = EPS_NHEP
 *         CHKERR( EPSGetProblemType(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setProblemType(self, problem_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSProblemType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":380
 *     #
 * 
 *     def getProblemType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the problem type from the EPS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":393
 *         return val
 * 
 *     def setProblemType(self, problem_type):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_24setProblemType[] = "EPS.setProblemType(self, problem_type)\n\n        Specifies the type of the eigenvalue problem.\n\n        Parameters\n        ----------\n        problem_type: `EPS.ProblemType` enumerate\n               The problem type to be set.\n\n        Notes\n        -----\n        Allowed values are: Hermitian (HEP), non-Hermitian (NHEP),\n        generalized Hermitian (GHEP), generalized non-Hermitian\n        (GNHEP), and generalized non-Hermitian with positive\n        semi-definite B (PGNHEP).\n\n        This function must be used to instruct SLEPc to exploit\n        symmetry. If no problem type is specified, by default a\n        non-Hermitian problem is assumed (either standard or\n        generalized). If the user knows that the problem is Hermitian\n        (i.e. ``A=A^H``) or generalized Hermitian (i.e. ``A=A^H``,\n        ``B=B^H``, and ``B`` positive definite) then it is recommended\n        to set the problem type so that eigensolver can exploit these\n        properties.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_problem_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setProblemType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problem_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_problem_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setProblemType") < 0)) __PYX_ERR(13, 393, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_problem_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setProblemType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 393, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_problem_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_24setProblemType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_problem_type) {
  EPSProblemType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSProblemType __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setProblemType", 0);

  /* "SLEPc/EPS.pyx":418
 *         properties.
 *         """
 *         cdef SlepcEPSProblemType val = problem_type             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetProblemType(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((EPSProblemType)__Pyx_PyInt_As_EPSProblemType(__pyx_v_problem_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 418, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":419
 *         """
 *         cdef SlepcEPSProblemType val = problem_type
 *         CHKERR( EPSSetProblemType(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def isGeneralized(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetProblemType(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 419, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":393
 *         return val
 * 
 *     def setProblemType(self, problem_type):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of the eigenvalue problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":421
 *         CHKERR( EPSSetProblemType(self.eps, val) )
 * 
 *     def isGeneralized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to a generalized
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_26isGeneralized[] = "EPS.isGeneralized(self)\n\n        Tells whether the EPS object corresponds to a generalized\n        eigenvalue problem.\n\n        Returns\n        -------\n        flag: boolean\n              True if two matrices were set with `setOperators()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isGeneralized (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("isGeneralized", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isGeneralized", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_26isGeneralized(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("isGeneralized", 0);

  /* "SLEPc/EPS.pyx":431
 *               True if two matrices were set with `setOperators()`.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSIsGeneralized(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":432
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsGeneralized(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsGeneralized(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 432, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":433
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsGeneralized(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def isHermitian(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":421
 *         CHKERR( EPSSetProblemType(self.eps, val) )
 * 
 *     def isGeneralized(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to a generalized
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isGeneralized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":435
 *         return <bint> tval
 * 
 *     def isHermitian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to a Hermitian
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_28isHermitian[] = "EPS.isHermitian(self)\n\n        Tells whether the EPS object corresponds to a Hermitian\n        eigenvalue problem.\n\n        Returns\n        -------\n        flag: boolean\n              True if the problem type set with `setProblemType()` was\n              Hermitian.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isHermitian (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("isHermitian", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isHermitian", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_28isHermitian(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("isHermitian", 0);

  /* "SLEPc/EPS.pyx":446
 *               Hermitian.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSIsHermitian(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":447
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsHermitian(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsHermitian(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 447, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":448
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsHermitian(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def isPositive(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":435
 *         return <bint> tval
 * 
 *     def isHermitian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to a Hermitian
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isHermitian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":450
 *         return <bint> tval
 * 
 *     def isPositive(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to an eigenvalue problem
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_30isPositive[] = "EPS.isPositive(self)\n\n        Tells whether the EPS object corresponds to an eigenvalue problem\n        type that requires a positive (semi-) definite matrix B.\n\n        Returns\n        -------\n        flag: boolean\n              True if the problem type set with `setProblemType()` was\n              positive.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isPositive (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("isPositive", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isPositive", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_30isPositive(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("isPositive", 0);

  /* "SLEPc/EPS.pyx":461
 *               positive.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSIsPositive(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":462
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsPositive(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSIsPositive(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 462, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":463
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSIsPositive(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def getBalance(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":450
 *         return <bint> tval
 * 
 *     def isPositive(self):             # <<<<<<<<<<<<<<
 *         """
 *         Tells whether the EPS object corresponds to an eigenvalue problem
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.isPositive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":465
 *         return <bint> tval
 * 
 *     def getBalance(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the balancing type used by the EPS object,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_32getBalance[] = "EPS.getBalance(self)\n\n        Gets the balancing type used by the EPS object,\n        and the associated parameters.\n\n        Returns\n        -------\n        balance: `EPS.Balance` enumerate\n                 The balancing method\n        iterations: integer\n                    Number of iterations of the balancing algorithm\n        cutoff: real\n                Cutoff value\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBalance (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBalance", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBalance", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_32getBalance(struct PySlepcEPSObject *__pyx_v_self) {
  EPSBalance __pyx_v_val;
  PetscInt __pyx_v_ival;
  PetscReal __pyx_v_rval;
  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;
  __Pyx_RefNannySetupContext("getBalance", 0);

  /* "SLEPc/EPS.pyx":479
 *                 Cutoff value
 *         """
 *         cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival = 0
 *         cdef PetscReal rval = 0
 */
  __pyx_v_val = EPS_BALANCE_ONESIDE;

  /* "SLEPc/EPS.pyx":480
 *         """
 *         cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = 0
 *         CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) )
 */
  __pyx_v_ival = 0;

  /* "SLEPc/EPS.pyx":481
 *         cdef SlepcEPSBalance val = EPS_BALANCE_ONESIDE
 *         cdef PetscInt ival = 0
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) )
 *         return (val, toInt(ival), toReal(rval))
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/EPS.pyx":482
 *         cdef PetscInt ival = 0
 *         cdef PetscReal rval = 0
 *         CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) )             # <<<<<<<<<<<<<<
 *         return (val, toInt(ival), toReal(rval))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetBalance(__pyx_v_self->eps, (&__pyx_v_val), (&__pyx_v_ival), (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 482, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":483
 *         cdef PetscReal rval = 0
 *         CHKERR( EPSGetBalance(self.eps, &val, &ival, &rval) )
 *         return (val, toInt(ival), toReal(rval))             # <<<<<<<<<<<<<<
 * 
 *     def setBalance(self, balance=None, iterations=None, cutoff=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSBalance(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":465
 *         return <bint> tval
 * 
 *     def getBalance(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the balancing type used by the EPS object,
 */

  /* 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_AddTraceback("slepc4py.SLEPc.EPS.getBalance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":485
 *         return (val, toInt(ival), toReal(rval))
 * 
 *     def setBalance(self, balance=None, iterations=None, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the balancing technique to be employed by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_34setBalance[] = "EPS.setBalance(self, balance=None, iterations=None, cutoff=None)\n\n        Specifies the balancing technique to be employed by the\n        eigensolver, and some parameters associated to it.\n\n        Parameters\n        ----------\n        balance: `EPS.Balance` enumerate\n                 The balancing method\n        iterations: integer\n                    Number of iterations of the balancing algorithm\n        cutoff: real\n                Cutoff value\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_balance = 0;
  PyObject *__pyx_v_iterations = 0;
  PyObject *__pyx_v_cutoff = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBalance (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_balance,&__pyx_n_s_iterations,&__pyx_n_s_cutoff,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_balance);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_iterations);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cutoff);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBalance") < 0)) __PYX_ERR(13, 485, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_balance = values[0];
    __pyx_v_iterations = values[1];
    __pyx_v_cutoff = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBalance", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 485, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBalance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_balance, __pyx_v_iterations, __pyx_v_cutoff);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_34setBalance(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_balance, PyObject *__pyx_v_iterations, PyObject *__pyx_v_cutoff) {
  EPSBalance __pyx_v_val;
  PetscInt __pyx_v_ival;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  EPSBalance __pyx_t_3;
  PetscInt __pyx_t_4;
  PetscReal __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("setBalance", 0);

  /* "SLEPc/EPS.pyx":499
 *                 Cutoff value
 *         """
 *         cdef SlepcEPSBalance val = <SlepcEPSBalance>PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         cdef PetscReal rval = PETSC_DEFAULT
 */
  __pyx_v_val = ((EPSBalance)PETSC_DEFAULT);

  /* "SLEPc/EPS.pyx":500
 *         """
 *         cdef SlepcEPSBalance val = <SlepcEPSBalance>PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if balance    is not None: val  = balance
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":501
 *         cdef SlepcEPSBalance val = <SlepcEPSBalance>PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if balance    is not None: val  = balance
 *         if iterations is not None: ival = asInt(iterations)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":502
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if balance    is not None: val  = balance             # <<<<<<<<<<<<<<
 *         if iterations is not None: ival = asInt(iterations)
 *         if cutoff     is not None: rval = asReal(cutoff)
 */
  __pyx_t_1 = (__pyx_v_balance != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((EPSBalance)__Pyx_PyInt_As_EPSBalance(__pyx_v_balance)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 502, __pyx_L1_error)
    __pyx_v_val = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":503
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         if balance    is not None: val  = balance
 *         if iterations is not None: ival = asInt(iterations)             # <<<<<<<<<<<<<<
 *         if cutoff     is not None: rval = asReal(cutoff)
 *         CHKERR( EPSSetBalance(self.eps, val, ival, rval) )
 */
  __pyx_t_2 = (__pyx_v_iterations != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_iterations); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(13, 503, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/EPS.pyx":504
 *         if balance    is not None: val  = balance
 *         if iterations is not None: ival = asInt(iterations)
 *         if cutoff     is not None: rval = asReal(cutoff)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetBalance(self.eps, val, ival, rval) )
 * 
 */
  __pyx_t_1 = (__pyx_v_cutoff != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_cutoff); if (unlikely(__pyx_t_5 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 504, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_5;
  }

  /* "SLEPc/EPS.pyx":505
 *         if iterations is not None: ival = asInt(iterations)
 *         if cutoff     is not None: rval = asReal(cutoff)
 *         CHKERR( EPSSetBalance(self.eps, val, ival, rval) )             # <<<<<<<<<<<<<<
 * 
 *     def getExtraction(self):
 */
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetBalance(__pyx_v_self->eps, __pyx_v_val, __pyx_v_ival, __pyx_v_rval)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(13, 505, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":485
 *         return (val, toInt(ival), toReal(rval))
 * 
 *     def setBalance(self, balance=None, iterations=None, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the balancing technique to be employed by the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBalance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":507
 *         CHKERR( EPSSetBalance(self.eps, val, ival, rval) )
 * 
 *     def getExtraction(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the extraction type used by the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_36getExtraction[] = "EPS.getExtraction(self)\n\n        Gets the extraction type used by the EPS object.\n\n        Returns\n        -------\n        extraction: `EPS.Extraction` enumerate\n                    The method of extraction.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getExtraction (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getExtraction", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getExtraction", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_36getExtraction(struct PySlepcEPSObject *__pyx_v_self) {
  EPSExtraction __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getExtraction", 0);

  /* "SLEPc/EPS.pyx":516
 *                     The method of extraction.
 *         """
 *         cdef SlepcEPSExtraction val = EPS_RITZ             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetExtraction(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_RITZ;

  /* "SLEPc/EPS.pyx":517
 *         """
 *         cdef SlepcEPSExtraction val = EPS_RITZ
 *         CHKERR( EPSGetExtraction(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetExtraction(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 517, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":518
 *         cdef SlepcEPSExtraction val = EPS_RITZ
 *         CHKERR( EPSGetExtraction(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setExtraction(self, extraction):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSExtraction(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":507
 *         CHKERR( EPSSetBalance(self.eps, val, ival, rval) )
 * 
 *     def getExtraction(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the extraction type used by the EPS object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":520
 *         return val
 * 
 *     def setExtraction(self, extraction):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the extraction type used by the EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_38setExtraction[] = "EPS.setExtraction(self, extraction)\n\n        Sets the extraction type used by the EPS object.\n\n        Parameters\n        ----------\n        extraction: `EPS.Extraction` enumerate\n                    The extraction method to be used by the solver.\n\n        Notes\n        -----\n        Not all eigensolvers support all types of extraction. See the\n        SLEPc documentation for details.\n\n        By default, a standard Rayleigh-Ritz extraction is used. Other\n        extractions may be useful when computing interior eigenvalues.\n\n        Harmonic-type extractions are used in combination with a\n        *target*. See `setTarget()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_extraction = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setExtraction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_extraction,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_extraction)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExtraction") < 0)) __PYX_ERR(13, 520, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_extraction = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setExtraction", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 520, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_extraction);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_38setExtraction(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_extraction) {
  EPSExtraction __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSExtraction __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setExtraction", 0);

  /* "SLEPc/EPS.pyx":540
 *         *target*. See `setTarget()`.
 *         """
 *         cdef SlepcEPSExtraction val = extraction             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetExtraction(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((EPSExtraction)__Pyx_PyInt_As_EPSExtraction(__pyx_v_extraction)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 540, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":541
 *         """
 *         cdef SlepcEPSExtraction val = extraction
 *         CHKERR( EPSSetExtraction(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getWhichEigenpairs(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetExtraction(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 541, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":520
 *         return val
 * 
 *     def setExtraction(self, extraction):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the extraction type used by the EPS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setExtraction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":543
 *         CHKERR( EPSSetExtraction(self.eps, val) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs[] = "EPS.getWhichEigenpairs(self)\n\n        Returns which portion of the spectrum is to be sought.\n\n        Returns\n        -------\n        which: `EPS.Which` enumerate\n               The portion of the spectrum to be sought by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self) {
  EPSWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getWhichEigenpairs", 0);

  /* "SLEPc/EPS.pyx":552
 *                The portion of the spectrum to be sought by the solver.
 *         """
 *         cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetWhichEigenpairs(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_LARGEST_MAGNITUDE;

  /* "SLEPc/EPS.pyx":553
 *         """
 *         cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE
 *         CHKERR( EPSGetWhichEigenpairs(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetWhichEigenpairs(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 553, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":554
 *         cdef SlepcEPSWhich val = EPS_LARGEST_MAGNITUDE
 *         CHKERR( EPSGetWhichEigenpairs(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setWhichEigenpairs(self, which):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":543
 *         CHKERR( EPSSetExtraction(self.eps, val) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":556
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs[] = "EPS.setWhichEigenpairs(self, which)\n\n        Specifies which portion of the spectrum is to be sought.\n\n        Parameters\n        ----------\n        which: `EPS.Which` enumerate\n               The portion of the spectrum to be sought by the solver.\n\n        Notes\n        -----\n        Not all eigensolvers implemented in EPS account for all the\n        possible values. Also, some values make sense only for certain\n        types of problems. If SLEPc is compiled for real numbers\n        `EPS.Which.LARGEST_IMAGINARY` and\n        `EPS.Which.SMALLEST_IMAGINARY` use the absolute value of the\n        imaginary part for eigenvalue selection.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_which = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(13, 556, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_which = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 556, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_which);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_which) {
  EPSWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSWhich __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setWhichEigenpairs", 0);

  /* "SLEPc/EPS.pyx":574
 *         imaginary part for eigenvalue selection.
 *         """
 *         cdef SlepcEPSWhich val = which             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetWhichEigenpairs(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((EPSWhich)__Pyx_PyInt_As_EPSWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 574, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":575
 *         """
 *         cdef SlepcEPSWhich val = which
 *         CHKERR( EPSSetWhichEigenpairs(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getTarget(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetWhichEigenpairs(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 575, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":556
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":577
 *         CHKERR( EPSSetWhichEigenpairs(self.eps, val) )
 * 
 *     def getTarget(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the value of the target.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_44getTarget[] = "EPS.getTarget(self)\n\n        Gets the value of the target.\n\n        Returns\n        -------\n        target: float (real or complex)\n                The value of the target.\n\n        Notes\n        -----\n        If the target was not set by the user, then zero is returned.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTarget (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTarget", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTarget", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_44getTarget(struct PySlepcEPSObject *__pyx_v_self) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTarget", 0);

  /* "SLEPc/EPS.pyx":590
 *         If the target was not set by the user, then zero is returned.
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetTarget(self.eps, &sval) )
 *         return toScalar(sval)
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/EPS.pyx":591
 *         """
 *         cdef PetscScalar sval = 0
 *         CHKERR( EPSGetTarget(self.eps, &sval) )             # <<<<<<<<<<<<<<
 *         return toScalar(sval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTarget(__pyx_v_self->eps, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 591, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":592
 *         cdef PetscScalar sval = 0
 *         CHKERR( EPSGetTarget(self.eps, &sval) )
 *         return toScalar(sval)             # <<<<<<<<<<<<<<
 * 
 *     def setTarget(self, target):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 592, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":577
 *         CHKERR( EPSSetWhichEigenpairs(self.eps, val) )
 * 
 *     def getTarget(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the value of the target.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTarget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":594
 *         return toScalar(sval)
 * 
 *     def setTarget(self, target):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the value of the target.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_46setTarget[] = "EPS.setTarget(self, target)\n\n        Sets the value of the target.\n\n        Parameters\n        ----------\n        target: float (real or complex)\n                The value of the target.\n\n        Notes\n        -----\n        The target is a scalar value used to determine the portion of\n        the spectrum of interest. It is used in combination with\n        `setWhichEigenpairs()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_target = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTarget (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_target,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTarget") < 0)) __PYX_ERR(13, 594, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_target = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTarget", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 594, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_target);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_46setTarget(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_target) {
  PetscScalar __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscScalar __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTarget", 0);

  /* "SLEPc/EPS.pyx":609
 *         `setWhichEigenpairs()`.
 *         """
 *         cdef PetscScalar sval = asScalar(target)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetTarget(self.eps, sval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asScalar(__pyx_v_target); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 609, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/EPS.pyx":610
 *         """
 *         cdef PetscScalar sval = asScalar(target)
 *         CHKERR( EPSSetTarget(self.eps, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def getInterval(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTarget(__pyx_v_self->eps, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 610, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":594
 *         return toScalar(sval)
 * 
 *     def setTarget(self, target):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the value of the target.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTarget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":612
 *         CHKERR( EPSSetTarget(self.eps, sval) )
 * 
 *     def getInterval(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the computational interval for spectrum slicing.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_48getInterval[] = "EPS.getInterval(self)\n\n        Gets the computational interval for spectrum slicing.\n\n        Returns\n        -------\n        inta: float\n                The left end of the interval.\n        intb: float\n                The right end of the interval.\n\n        Notes\n        -----\n        If the interval was not set by the user, then zeros are returned.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getInterval (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getInterval", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getInterval", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_48getInterval(struct PySlepcEPSObject *__pyx_v_self) {
  PetscReal __pyx_v_inta;
  PetscReal __pyx_v_intb;
  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;
  __Pyx_RefNannySetupContext("getInterval", 0);

  /* "SLEPc/EPS.pyx":627
 *         If the interval was not set by the user, then zeros are returned.
 *         """
 *         cdef PetscReal inta = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal intb = 0
 *         CHKERR( EPSGetInterval(self.eps, &inta, &intb) )
 */
  __pyx_v_inta = 0.0;

  /* "SLEPc/EPS.pyx":628
 *         """
 *         cdef PetscReal inta = 0
 *         cdef PetscReal intb = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetInterval(self.eps, &inta, &intb) )
 *         return (toReal(inta), toReal(intb))
 */
  __pyx_v_intb = 0.0;

  /* "SLEPc/EPS.pyx":629
 *         cdef PetscReal inta = 0
 *         cdef PetscReal intb = 0
 *         CHKERR( EPSGetInterval(self.eps, &inta, &intb) )             # <<<<<<<<<<<<<<
 *         return (toReal(inta), toReal(intb))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetInterval(__pyx_v_self->eps, (&__pyx_v_inta), (&__pyx_v_intb))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 629, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":630
 *         cdef PetscReal intb = 0
 *         CHKERR( EPSGetInterval(self.eps, &inta, &intb) )
 *         return (toReal(inta), toReal(intb))             # <<<<<<<<<<<<<<
 * 
 *     def setInterval(self, inta, intb):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_inta); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_intb); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":612
 *         CHKERR( EPSSetTarget(self.eps, sval) )
 * 
 *     def getInterval(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the computational interval for spectrum slicing.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getInterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":632
 *         return (toReal(inta), toReal(intb))
 * 
 *     def setInterval(self, inta, intb):             # <<<<<<<<<<<<<<
 *         """
 *         Defines the computational interval for spectrum slicing.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_50setInterval[] = "EPS.setInterval(self, inta, intb)\n\n        Defines the computational interval for spectrum slicing.\n\n        Parameters\n        ----------\n        inta: float\n                The left end of the interval.\n        intb: float\n                The right end of the interval.\n\n        Notes\n        -----\n        Spectrum slicing is a technique employed for computing all\n        eigenvalues of symmetric eigenproblems in a given interval.\n        This function provides the interval to be considered. It must\n        be used in combination with `EPS.Which.ALL`, see\n        `setWhichEigenpairs()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_inta = 0;
  PyObject *__pyx_v_intb = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInterval (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inta,&__pyx_n_s_intb,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_inta)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_intb)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, 1); __PYX_ERR(13, 632, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInterval") < 0)) __PYX_ERR(13, 632, __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_inta = values[0];
    __pyx_v_intb = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInterval", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 632, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_inta, __pyx_v_intb);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_50setInterval(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_inta, PyObject *__pyx_v_intb) {
  PetscReal __pyx_v_rval1;
  PetscReal __pyx_v_rval2;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscReal __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setInterval", 0);

  /* "SLEPc/EPS.pyx":651
 *         `setWhichEigenpairs()`.
 *         """
 *         cdef PetscReal rval1 = asReal(inta)             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval2 = asReal(intb)
 *         CHKERR( EPSSetInterval(self.eps, rval1, rval2) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_inta); if (unlikely(__pyx_t_1 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 651, __pyx_L1_error)
  __pyx_v_rval1 = __pyx_t_1;

  /* "SLEPc/EPS.pyx":652
 *         """
 *         cdef PetscReal rval1 = asReal(inta)
 *         cdef PetscReal rval2 = asReal(intb)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetInterval(self.eps, rval1, rval2) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_intb); if (unlikely(__pyx_t_1 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 652, __pyx_L1_error)
  __pyx_v_rval2 = __pyx_t_1;

  /* "SLEPc/EPS.pyx":653
 *         cdef PetscReal rval1 = asReal(inta)
 *         cdef PetscReal rval2 = asReal(intb)
 *         CHKERR( EPSSetInterval(self.eps, rval1, rval2) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetInterval(__pyx_v_self->eps, __pyx_v_rval1, __pyx_v_rval2)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 653, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":632
 *         return (toReal(inta), toReal(intb))
 * 
 *     def setInterval(self, inta, intb):             # <<<<<<<<<<<<<<
 *         """
 *         Defines the computational interval for spectrum slicing.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":657
 *     #
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_52getTolerances[] = "EPS.getTolerances(self)\n\n        Gets the tolerance and maximum iteration count used by the\n        default EPS convergence tests.\n\n        Returns\n        -------\n        tol: float\n             The convergence tolerance.\n        max_it: int\n             The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_52getTolerances(struct PySlepcEPSObject *__pyx_v_self) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  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;
  __Pyx_RefNannySetupContext("getTolerances", 0);

  /* "SLEPc/EPS.pyx":669
 *              The maximum number of iterations
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = 0
 *         CHKERR( EPSGetTolerances(self.eps, &rval, &ival) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/EPS.pyx":670
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetTolerances(self.eps, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))
 */
  __pyx_v_ival = 0;

  /* "SLEPc/EPS.pyx":671
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0
 *         CHKERR( EPSGetTolerances(self.eps, &rval, &ival) )             # <<<<<<<<<<<<<<
 *         return (toReal(rval), toInt(ival))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTolerances(__pyx_v_self->eps, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 671, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":672
 *         cdef PetscInt  ival = 0
 *         CHKERR( EPSGetTolerances(self.eps, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))             # <<<<<<<<<<<<<<
 * 
 *     def setTolerances(self, tol=None, max_it=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":657
 *     #
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":674
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_54setTolerances[] = "EPS.setTolerances(self, tol=None, max_it=None)\n\n        Sets the tolerance and maximum iteration count used by the\n        default EPS convergence tests.\n\n        Parameters\n        ----------\n        tol: float, optional\n             The convergence tolerance.\n        max_it: int, optional\n             The maximum number of iterations\n\n        Notes\n        -----\n        Use `DECIDE` for maxits to assign a reasonably good value,\n        which is dependent on the solution method.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_max_it = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(13, 674, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tol = values[0];
    __pyx_v_max_it = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 674, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_54setTolerances(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscReal __pyx_t_3;
  PetscInt __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("setTolerances", 0);

  /* "SLEPc/EPS.pyx":691
 *         which is dependent on the solution method.
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":692
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":693
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)             # <<<<<<<<<<<<<<
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( EPSSetTolerances(self.eps, rval, ival) )
 */
  __pyx_t_1 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 693, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":694
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetTolerances(self.eps, rval, ival) )
 * 
 */
  __pyx_t_2 = (__pyx_v_max_it != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(13, 694, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/EPS.pyx":695
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( EPSSetTolerances(self.eps, rval, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getConvergenceTest(self):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTolerances(__pyx_v_self->eps, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(13, 695, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":674
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":697
 *         CHKERR( EPSSetTolerances(self.eps, rval, ival) )
 * 
 *     def getConvergenceTest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the method used to compute the error estimate
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_56getConvergenceTest[] = "EPS.getConvergenceTest(self)\n\n        Return the method used to compute the error estimate \n        used in the convergence test. \n\n        Returns\n        -------\n        conv: EPS.Conv\n            The method used to compute the error estimate \n            used in the convergence test. \n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergenceTest (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergenceTest", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergenceTest", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_56getConvergenceTest(struct PySlepcEPSObject *__pyx_v_self) {
  EPSConv __pyx_v_conv;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergenceTest", 0);

  /* "SLEPc/EPS.pyx":708
 *             used in the convergence test.
 *         """
 *         cdef SlepcEPSConv conv = EPS_CONV_REL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetConvergenceTest(self.eps, &conv) )
 *         return conv
 */
  __pyx_v_conv = EPS_CONV_REL;

  /* "SLEPc/EPS.pyx":709
 *         """
 *         cdef SlepcEPSConv conv = EPS_CONV_REL
 *         CHKERR( EPSGetConvergenceTest(self.eps, &conv) )             # <<<<<<<<<<<<<<
 *         return conv
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConvergenceTest(__pyx_v_self->eps, (&__pyx_v_conv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 709, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":710
 *         cdef SlepcEPSConv conv = EPS_CONV_REL
 *         CHKERR( EPSGetConvergenceTest(self.eps, &conv) )
 *         return conv             # <<<<<<<<<<<<<<
 * 
 *     def setConvergenceTest(self, conv):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSConv(__pyx_v_conv); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":697
 *         CHKERR( EPSSetTolerances(self.eps, rval, ival) )
 * 
 *     def getConvergenceTest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the method used to compute the error estimate
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":712
 *         return conv
 * 
 *     def setConvergenceTest(self, conv):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies how to compute the error estimate
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_58setConvergenceTest[] = "EPS.setConvergenceTest(self, conv)\n\n        Specifies how to compute the error estimate \n        used in the convergence test. \n\n        Parameters\n        ----------\n        conv: EPS.Conv\n            The method used to compute the error estimate \n            used in the convergence test.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setConvergenceTest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConvergenceTest") < 0)) __PYX_ERR(13, 712, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_conv = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setConvergenceTest", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 712, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_conv);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_58setConvergenceTest(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_conv) {
  EPSConv __pyx_v_tconv;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSConv __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setConvergenceTest", 0);

  /* "SLEPc/EPS.pyx":723
 *             used in the convergence test.
 *         """
 *         cdef SlepcEPSConv tconv = conv             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetConvergenceTest(self.eps, tconv) )
 * 
 */
  __pyx_t_1 = ((EPSConv)__Pyx_PyInt_As_EPSConv(__pyx_v_conv)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 723, __pyx_L1_error)
  __pyx_v_tconv = __pyx_t_1;

  /* "SLEPc/EPS.pyx":724
 *         """
 *         cdef SlepcEPSConv tconv = conv
 *         CHKERR( EPSSetConvergenceTest(self.eps, tconv) )             # <<<<<<<<<<<<<<
 * 
 *     def getTrueResidual(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetConvergenceTest(__pyx_v_self->eps, __pyx_v_tconv)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 724, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":712
 *         return conv
 * 
 *     def setConvergenceTest(self, conv):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies how to compute the error estimate
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":726
 *         CHKERR( EPSSetConvergenceTest(self.eps, tconv) )
 * 
 *     def getTrueResidual(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether true residual must be
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_60getTrueResidual[] = "EPS.getTrueResidual(self)\n\n        Returns the flag indicating whether true residual must be\n        computed explicitly or not.\n\n        Returns\n        -------\n        trueres: bool\n            Whether the solver compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrueResidual (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTrueResidual", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrueResidual", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_60getTrueResidual(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrueResidual", 0);

  /* "SLEPc/EPS.pyx":736
 *             Whether the solver compute all residuals or not.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetTrueResidual(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":737
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSGetTrueResidual(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTrueResidual(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 737, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":738
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSGetTrueResidual(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def setTrueResidual(self, trueres):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":726
 *         CHKERR( EPSSetConvergenceTest(self.eps, tconv) )
 * 
 *     def getTrueResidual(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether true residual must be
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":740
 *         return <bint> tval
 * 
 *     def setTrueResidual(self, trueres):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the true residual
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_62setTrueResidual[] = "EPS.setTrueResidual(self, trueres)\n\n        Specifies if the solver must compute the true residual \n        explicitly or not.\n\n        Parameters\n        ----------\n        trueres: bool\n            Whether compute the true residual or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_trueres = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrueResidual (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trueres,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trueres)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrueResidual") < 0)) __PYX_ERR(13, 740, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_trueres = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTrueResidual", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 740, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trueres);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_62setTrueResidual(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trueres) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTrueResidual", 0);

  /* "SLEPc/EPS.pyx":750
 *             Whether compute the true residual or not.
 *         """
 *         cdef PetscBool tval = trueres             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetTrueResidual(self.eps, tval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trueres)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 750, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_1;

  /* "SLEPc/EPS.pyx":751
 *         """
 *         cdef PetscBool tval = trueres
 *         CHKERR( EPSSetTrueResidual(self.eps, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def getTrackAll(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTrueResidual(__pyx_v_self->eps, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 751, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":740
 *         return <bint> tval
 * 
 *     def setTrueResidual(self, trueres):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the true residual
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrueResidual", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":753
 *         CHKERR( EPSSetTrueResidual(self.eps, tval) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrackAll[] = "EPS.getTrackAll(self)\n\n        Returns the flag indicating whether all residual norms must be\n        computed or not.\n\n        Returns\n        -------\n        trackall: bool\n            Whether the solver compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_64getTrackAll(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrackAll", 0);

  /* "SLEPc/EPS.pyx":763
 *             Whether the solver compute all residuals or not.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetTrackAll(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":764
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSGetTrackAll(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetTrackAll(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 764, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":765
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSGetTrackAll(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def setTrackAll(self, trackall):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":753
 *         CHKERR( EPSSetTrueResidual(self.eps, tval) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":767
 *         return <bint> tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrackAll[] = "EPS.setTrackAll(self, trackall)\n\n        Specifies if the solver must compute the residual of all\n        approximate eigenpairs or not.\n\n        Parameters\n        ----------\n        trackall: bool\n            Whether compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_trackall = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(13, 767, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_trackall = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 767, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_trackall);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_66setTrackAll(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_trackall) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTrackAll", 0);

  /* "SLEPc/EPS.pyx":777
 *             Whether compute all residuals or not.
 *         """
 *         cdef PetscBool tval = trackall             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetTrackAll(self.eps, tval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 777, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_1;

  /* "SLEPc/EPS.pyx":778
 *         """
 *         cdef PetscBool tval = trackall
 *         CHKERR( EPSSetTrackAll(self.eps, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetTrackAll(__pyx_v_self->eps, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 778, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":767
 *         return <bint> tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":780
 *         CHKERR( EPSSetTrackAll(self.eps, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_68getDimensions[] = "EPS.getDimensions(self)\n\n        Gets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Returns\n        -------\n        nev: int\n             Number of eigenvalues to compute.\n        ncv: int\n             Maximum dimension of the subspace to be used by the\n             solver.\n        mpd: int\n             Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_68getDimensions(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  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;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/EPS.pyx":795
 *              Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/EPS.pyx":796
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/EPS.pyx":797
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/EPS.pyx":798
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetDimensions(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 798, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":799
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":780
 *         CHKERR( EPSSetTrackAll(self.eps, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

  /* 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_AddTraceback("slepc4py.SLEPc.EPS.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":801
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_70setDimensions[] = "EPS.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n        Sets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Parameters\n        ----------\n        nev: int, optional\n             Number of eigenvalues to compute.\n        ncv: int, optional\n             Maximum dimension of the subspace to be used by the\n             solver.\n        mpd: int, optional\n             Maximum dimension allowed for the projected problem.\n\n        Notes\n        -----\n        Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good\n        value, which is dependent on the solution method.\n\n        The parameters `ncv` and `mpd` are intimately related, so that\n        the user is advised to set one of them at most. Normal usage\n        is the following:\n\n        + In cases where `nev` is small, the user sets `ncv`\n          (a reasonable default is 2 * `nev`).\n\n        + In cases where `nev` is large, the user sets `mpd`.\n\n        The value of `ncv` should always be between `nev` and (`nev` +\n        `mpd`), typically `ncv` = `nev` + `mpd`. If `nev` is not too\n        large, `mpd` = `nev` is a reasonable choice, otherwise a\n        smaller value should be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nev = 0;
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_v_mpd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(13, 801, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_nev = values[0];
    __pyx_v_ncv = values[1];
    __pyx_v_mpd = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 801, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_70setDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/EPS.pyx":835
 *         smaller value should be used.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":836
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":837
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 */
  __pyx_v_ival3 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":838
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)             # <<<<<<<<<<<<<<
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 */
  __pyx_t_1 = (__pyx_v_nev != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 838, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":839
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)             # <<<<<<<<<<<<<<
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) )
 */
  __pyx_t_2 = (__pyx_v_ncv != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 839, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":840
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 */
  __pyx_t_1 = (__pyx_v_mpd != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 840, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":841
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) )             # <<<<<<<<<<<<<<
 * 
 *     def getST(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDimensions(__pyx_v_self->eps, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 841, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":801
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":843
 *         CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 *     def getST(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the spectral transformation (`ST`) object associated to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_72getST[] = "EPS.getST(self)\n\n        Obtain the spectral transformation (`ST`) object associated to\n        the eigensolver object.\n\n        Returns\n        -------\n        st: ST\n            The spectral transformation.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getST (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getST", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getST", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_72getST(struct PySlepcEPSObject *__pyx_v_self) {
  struct PySlepcSTObject *__pyx_v_st = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getST", 0);

  /* "SLEPc/EPS.pyx":853
 *             The spectral transformation.
 *         """
 *         cdef ST st = ST()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetST(self.eps, &st.st) )
 *         PetscINCREF(st.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":854
 *         """
 *         cdef ST st = ST()
 *         CHKERR( EPSGetST(self.eps, &st.st) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(st.obj)
 *         return st
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetST(__pyx_v_self->eps, (&__pyx_v_st->st))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 854, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":855
 *         cdef ST st = ST()
 *         CHKERR( EPSGetST(self.eps, &st.st) )
 *         PetscINCREF(st.obj)             # <<<<<<<<<<<<<<
 *         return st
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":856
 *         CHKERR( EPSGetST(self.eps, &st.st) )
 *         PetscINCREF(st.obj)
 *         return st             # <<<<<<<<<<<<<<
 * 
 *     def setST(self, ST st not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_st));
  __pyx_r = ((PyObject *)__pyx_v_st);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":843
 *         CHKERR( EPSSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 *     def getST(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the spectral transformation (`ST`) object associated to
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":858
 *         return st
 * 
 *     def setST(self, ST st not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a spectral transformation object to the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_74setST[] = "EPS.setST(self, ST st)\n\n        Associates a spectral transformation object to the\n        eigensolver.\n\n        Parameters\n        ----------\n        st: ST\n            The spectral transformation.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcSTObject *__pyx_v_st = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setST (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setST") < 0)) __PYX_ERR(13, 858, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_st = ((struct PySlepcSTObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setST", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 858, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), __pyx_ptype_8slepc4py_5SLEPc_ST, 0, "st", 0))) __PYX_ERR(13, 858, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_st);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_74setST(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setST", 0);

  /* "SLEPc/EPS.pyx":868
 *             The spectral transformation.
 *         """
 *         CHKERR( EPSSetST(self.eps, st.st) )             # <<<<<<<<<<<<<<
 * 
 *     def getBV(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetST(__pyx_v_self->eps, __pyx_v_st->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 868, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":858
 *         return st
 * 
 *     def setST(self, ST st not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a spectral transformation object to the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":870
 *         CHKERR( EPSSetST(self.eps, st.st) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vector objects associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_76getBV[] = "EPS.getBV(self)\n\n        Obtain the basis vector objects associated to the eigensolver.\n\n        Returns\n        -------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBV (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_76getBV(struct PySlepcEPSObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getBV", 0);

  /* "SLEPc/EPS.pyx":879
 *             The basis vectors context.
 *         """
 *         cdef BV bv = BV()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetBV(self.eps, &bv.bv) )
 *         PetscINCREF(bv.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":880
 *         """
 *         cdef BV bv = BV()
 *         CHKERR( EPSGetBV(self.eps, &bv.bv) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(bv.obj)
 *         return bv
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetBV(__pyx_v_self->eps, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 880, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":881
 *         cdef BV bv = BV()
 *         CHKERR( EPSGetBV(self.eps, &bv.bv) )
 *         PetscINCREF(bv.obj)             # <<<<<<<<<<<<<<
 *         return bv
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":882
 *         CHKERR( EPSGetBV(self.eps, &bv.bv) )
 *         PetscINCREF(bv.obj)
 *         return bv             # <<<<<<<<<<<<<<
 * 
 *     def setBV(self, BV bv not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bv));
  __pyx_r = ((PyObject *)__pyx_v_bv);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":870
 *         CHKERR( EPSSetST(self.eps, st.st) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vector objects associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":884
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_78setBV[] = "EPS.setBV(self, BV bv)\n\n        Associates a basis vectors object to the eigensolver.\n\n        Parameters\n        ----------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(13, 884, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_bv = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 884, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(13, 884, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_bv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_78setBV(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setBV", 0);

  /* "SLEPc/EPS.pyx":893
 *             The basis vectors context.
 *         """
 *         CHKERR( EPSSetBV(self.eps, bv.bv) )             # <<<<<<<<<<<<<<
 * 
 *     def getDS(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetBV(__pyx_v_self->eps, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 893, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":884
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":895
 *         CHKERR( EPSSetBV(self.eps, bv.bv) )
 * 
 *     def getDS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the direct solver associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_80getDS[] = "EPS.getDS(self)\n\n        Obtain the direct solver associated to the eigensolver.\n\n        Returns\n        -------\n        ds: DS\n            The direct solver context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDS (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDS", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_80getDS(struct PySlepcEPSObject *__pyx_v_self) {
  struct PySlepcDSObject *__pyx_v_ds = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getDS", 0);

  /* "SLEPc/EPS.pyx":904
 *             The direct solver context.
 *         """
 *         cdef DS ds = DS()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetDS(self.eps, &ds.ds) )
 *         PetscINCREF(ds.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ds = ((struct PySlepcDSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":905
 *         """
 *         cdef DS ds = DS()
 *         CHKERR( EPSGetDS(self.eps, &ds.ds) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(ds.obj)
 *         return ds
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetDS(__pyx_v_self->eps, (&__pyx_v_ds->ds))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 905, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":906
 *         cdef DS ds = DS()
 *         CHKERR( EPSGetDS(self.eps, &ds.ds) )
 *         PetscINCREF(ds.obj)             # <<<<<<<<<<<<<<
 *         return ds
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_ds->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":907
 *         CHKERR( EPSGetDS(self.eps, &ds.ds) )
 *         PetscINCREF(ds.obj)
 *         return ds             # <<<<<<<<<<<<<<
 * 
 *     def setDS(self, DS ds not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ds));
  __pyx_r = ((PyObject *)__pyx_v_ds);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":895
 *         CHKERR( EPSSetBV(self.eps, bv.bv) )
 * 
 *     def getDS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the direct solver associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getDS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ds);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":909
 *         return ds
 * 
 *     def setDS(self, DS ds not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a direct solver object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_82setDS[] = "EPS.setDS(self, DS ds)\n\n        Associates a direct solver object to the eigensolver.\n\n        Parameters\n        ----------\n        ds: DS\n            The direct solver context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcDSObject *__pyx_v_ds = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ds,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ds)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDS") < 0)) __PYX_ERR(13, 909, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ds = ((struct PySlepcDSObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 909, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ds), __pyx_ptype_8slepc4py_5SLEPc_DS, 0, "ds", 0))) __PYX_ERR(13, 909, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_ds);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_82setDS(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcDSObject *__pyx_v_ds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setDS", 0);

  /* "SLEPc/EPS.pyx":918
 *             The direct solver context.
 *         """
 *         CHKERR( EPSSetDS(self.eps, ds.ds) )             # <<<<<<<<<<<<<<
 * 
 *     def getRG(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDS(__pyx_v_self->eps, __pyx_v_ds->ds)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 918, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":909
 *         return ds
 * 
 *     def setDS(self, DS ds not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a direct solver object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":920
 *         CHKERR( EPSSetDS(self.eps, ds.ds) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_84getRG[] = "EPS.getRG(self)\n\n        Obtain the region object associated to the eigensolver.\n\n        Returns\n        -------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRG (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_84getRG(struct PySlepcEPSObject *__pyx_v_self) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getRG", 0);

  /* "SLEPc/EPS.pyx":929
 *             The region context.
 *         """
 *         cdef RG rg = RG()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetRG(self.eps, &rg.rg) )
 *         PetscINCREF(rg.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 929, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":930
 *         """
 *         cdef RG rg = RG()
 *         CHKERR( EPSGetRG(self.eps, &rg.rg) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(rg.obj)
 *         return rg
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetRG(__pyx_v_self->eps, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 930, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":931
 *         cdef RG rg = RG()
 *         CHKERR( EPSGetRG(self.eps, &rg.rg) )
 *         PetscINCREF(rg.obj)             # <<<<<<<<<<<<<<
 *         return rg
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":932
 *         CHKERR( EPSGetRG(self.eps, &rg.rg) )
 *         PetscINCREF(rg.obj)
 *         return rg             # <<<<<<<<<<<<<<
 * 
 *     def setRG(self, RG rg not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_rg));
  __pyx_r = ((PyObject *)__pyx_v_rg);
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":920
 *         CHKERR( EPSSetDS(self.eps, ds.ds) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_rg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":934
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_86setRG[] = "EPS.setRG(self, RG rg)\n\n        Associates a region object to the eigensolver.\n\n        Parameters\n        ----------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRG (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(13, 934, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_rg = ((struct PySlepcRGObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 934, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(13, 934, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_rg);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_86setRG(struct PySlepcEPSObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setRG", 0);

  /* "SLEPc/EPS.pyx":943
 *             The region context.
 *         """
 *         CHKERR( EPSSetRG(self.eps, rg.rg) )             # <<<<<<<<<<<<<<
 * 
 *     def getOperators(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetRG(__pyx_v_self->eps, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 943, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":934
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":945
 *         CHKERR( EPSSetRG(self.eps, rg.rg) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_88getOperators[] = "EPS.getOperators(self)\n\n        Gets the matrices associated with the eigenvalue problem.\n\n        Returns\n        -------\n        A: Mat\n           The matrix associated with the eigensystem.\n        B: Mat\n           The second matrix in the case of generalized eigenproblems.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOperators (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_88getOperators(struct PySlepcEPSObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PyPetscMatObject *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getOperators", 0);

  /* "SLEPc/EPS.pyx":956
 *            The second matrix in the case of generalized eigenproblems.
 *         """
 *         cdef Mat A = Mat()             # <<<<<<<<<<<<<<
 *         cdef Mat B = Mat()
 *         CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) )
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":957
 *         """
 *         cdef Mat A = Mat()
 *         cdef Mat B = Mat()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":958
 *         cdef Mat A = Mat()
 *         cdef Mat B = Mat()
 *         CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOperators(__pyx_v_self->eps, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 958, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":959
 *         cdef Mat B = Mat()
 *         CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *         PetscINCREF(B.obj)
 *         return (A, B)
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":960
 *         CHKERR( EPSGetOperators(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)             # <<<<<<<<<<<<<<
 *         return (A, B)
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":961
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)
 *         return (A, B)             # <<<<<<<<<<<<<<
 * 
 *     def setOperators(self, Mat A not None, Mat B=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_A));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_A));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_A));
  __Pyx_INCREF(((PyObject *)__pyx_v_B));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_B));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_B));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":945
 *         CHKERR( EPSSetRG(self.eps, rg.rg) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":963
 *         return (A, B)
 * 
 *     def setOperators(self, Mat A not None, Mat B=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_90setOperators[] = "EPS.setOperators(self, Mat A, Mat B=None)\n\n        Sets the matrices associated with the eigenvalue problem.\n\n        Parameters\n        ----------\n        A: Mat\n           The matrix associated with the eigensystem.\n        B: Mat, optional\n           The second matrix in the case of generalized eigenproblems;\n           if not provided, a standard eigenproblem is assumed.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PyPetscMatObject *__pyx_v_B = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOperators (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_B,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((struct PyPetscMatObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_B);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(13, 963, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_A = ((struct PyPetscMatObject *)values[0]);
    __pyx_v_B = ((struct PyPetscMatObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOperators", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 963, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(13, 963, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "B", 0))) __PYX_ERR(13, 963, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_A, __pyx_v_B);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_90setOperators(struct PySlepcEPSObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A, struct PyPetscMatObject *__pyx_v_B) {
  Mat __pyx_v_Bmat;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Mat __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setOperators", 0);

  /* "SLEPc/EPS.pyx":975
 *            if not provided, a standard eigenproblem is assumed.
 *         """
 *         cdef PetscMat Bmat = NULL             # <<<<<<<<<<<<<<
 *         if B is not None: Bmat = B.mat
 *         CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) )
 */
  __pyx_v_Bmat = NULL;

  /* "SLEPc/EPS.pyx":976
 *         """
 *         cdef PetscMat Bmat = NULL
 *         if B is not None: Bmat = B.mat             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_B) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_B->mat;
    __pyx_v_Bmat = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":977
 *         cdef PetscMat Bmat = NULL
 *         if B is not None: Bmat = B.mat
 *         CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) )             # <<<<<<<<<<<<<<
 * 
 *     def setDeflationSpace(self, space):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetOperators(__pyx_v_self->eps, __pyx_v_A->mat, __pyx_v_Bmat)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 977, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":963
 *         return (A, B)
 * 
 *     def setOperators(self, Mat A not None, Mat B=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":979
 *         CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) )
 * 
 *     def setDeflationSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Add vectors to the basis of the deflation space.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_92setDeflationSpace[] = "EPS.setDeflationSpace(self, space)\n\n        Add vectors to the basis of the deflation space.\n\n        Parameters\n        ----------\n        space: a Vec or an array of Vec\n               Set of basis vectors to be added to the deflation\n               space.\n\n        Notes\n        -----\n        When a deflation space is given, the eigensolver seeks the\n        eigensolution in the restriction of the problem to the\n        orthogonal complement of this space. This can be used for\n        instance in the case that an invariant subspace is known\n        beforehand (such as the nullspace of the matrix).\n\n        The vectors do not need to be mutually orthonormal, since they\n        are explicitly orthonormalized internally.\n\n        These vectors do not persist from one `solve()` call to the other,\n        so the deflation space should be set every time.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_space = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDeflationSpace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDeflationSpace") < 0)) __PYX_ERR(13, 979, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_space = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDeflationSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 979, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDeflationSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_92setDeflationSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space) {
  Vec *__pyx_v_vs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setDeflationSpace", 0);
  __Pyx_INCREF(__pyx_v_space);

  /* "SLEPc/EPS.pyx":1003
 *         so the deflation space should be set every time.
 *         """
 *         if isinstance(space, Vec): space = [space]             # <<<<<<<<<<<<<<
 *         cdef PetscVec* vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_space);
    __Pyx_GIVEREF(__pyx_v_space);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space);
    __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/EPS.pyx":1004
 *         """
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec* vs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 */
  __pyx_v_vs = NULL;

  /* "SLEPc/EPS.pyx":1005
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec* vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1005, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/EPS.pyx":1006
 *         cdef PetscVec* vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)             # <<<<<<<<<<<<<<
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( EPSSetDeflationSpace(self.eps, <PetscInt>ns, vs) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/EPS.pyx":1007
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetDeflationSpace(self.eps, <PetscInt>ns, vs) )
 * 
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(13, 1007, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/EPS.pyx":1008
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( EPSSetDeflationSpace(self.eps, <PetscInt>ns, vs) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetDeflationSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(13, 1008, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":979
 *         CHKERR( EPSSetOperators(self.eps, A.mat, Bmat) )
 * 
 *     def setDeflationSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Add vectors to the basis of the deflation space.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setDeflationSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_space);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1012
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_94setInitialSpace[] = "EPS.setInitialSpace(self, space)\n\n        Sets the initial space from which the eigensolver starts to\n        iterate.\n\n        Parameters\n        ----------\n        space: Vec or sequence of Vec\n           The initial space\n\n        Notes\n        -----\n        Some solvers start to iterate on a single vector (initial vector).\n        In that case, the other vectors are ignored.\n\n        In contrast to `setDeflationSpace()`, these vectors do not persist\n        from one `solve()` call to the other, so the initial space should be\n        set every time.\n\n        The vectors do not need to be mutually orthonormal, since they are\n        explicitly orthonormalized internally.\n\n        Common usage of this function is when the user can provide a rough\n        approximation of the wanted eigenspace. Then, convergence may be faster.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_space = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(13, 1012, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_space = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1012, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_space);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_94setInitialSpace(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_space) {
  Vec *__pyx_v_vs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setInitialSpace", 0);
  __Pyx_INCREF(__pyx_v_space);

  /* "SLEPc/EPS.pyx":1037
 *         approximation of the wanted eigenspace. Then, convergence may be faster.
 *         """
 *         if isinstance(space, Vec): space = [space]             # <<<<<<<<<<<<<<
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1037, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_space);
    __Pyx_GIVEREF(__pyx_v_space);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space);
    __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/EPS.pyx":1038
 *         """
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 */
  __pyx_v_vs = NULL;

  /* "SLEPc/EPS.pyx":1039
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1039, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/EPS.pyx":1040
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)             # <<<<<<<<<<<<<<
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( EPSSetInitialSpace(self.eps, <PetscInt>ns, vs) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1040, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/EPS.pyx":1041
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec             # <<<<<<<<<<<<<<
 *         CHKERR( EPSSetInitialSpace(self.eps, <PetscInt>ns, vs) )
 * 
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(13, 1041, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/EPS.pyx":1042
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( EPSSetInitialSpace(self.eps, <PetscInt>ns, vs) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetInitialSpace(__pyx_v_self->eps, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(13, 1042, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1012
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_space);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1046
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for an EPS object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_96cancelMonitor[] = "EPS.cancelMonitor(self)\n\n        Clears all monitors for an EPS object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_96cancelMonitor(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("cancelMonitor", 0);

  /* "SLEPc/EPS.pyx":1050
 *         Clears all monitors for an EPS object.
 *         """
 *         CHKERR( EPSMonitorCancel(self.eps) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSMonitorCancel(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1050, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1046
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for an EPS object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1054
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_98setUp[] = "EPS.setUp(self)\n\n        Sets up all the internal data structures necessary for the\n        execution of the eigensolver.\n\n        Notes\n        -----\n        This function need not be called explicitly in most cases,\n        since `solve()` calls it. It can be useful when one wants to\n        measure the set-up time separately from the solve time.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_98setUp(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/EPS.pyx":1065
 *         measure the set-up time separately from the solve time.
 *         """
 *         CHKERR( EPSSetUp(self.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def solve(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSetUp(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1065, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1054
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1067
 *         CHKERR( EPSSetUp(self.eps) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_100solve[] = "EPS.solve(self)\n\n        Solves the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_100solve(struct PySlepcEPSObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "SLEPc/EPS.pyx":1071
 *         Solves the eigensystem.
 *         """
 *         CHKERR( EPSSolve(self.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def getIterationNumber(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSSolve(__pyx_v_self->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1071, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1067
 *         CHKERR( EPSSetUp(self.eps) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1073
 *         CHKERR( EPSSolve(self.eps) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_102getIterationNumber[] = "EPS.getIterationNumber(self)\n\n        Gets the current iteration number. If the call to `solve()` is\n        complete, then it returns the number of iterations carried out\n        by the solution method.\n\n        Returns\n        -------\n        its: int\n             Iteration number.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_102getIterationNumber(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getIterationNumber", 0);

  /* "SLEPc/EPS.pyx":1084
 *              Iteration number.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetIterationNumber(self.eps, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/EPS.pyx":1085
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( EPSGetIterationNumber(self.eps, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetIterationNumber(__pyx_v_self->eps, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1085, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1086
 *         cdef PetscInt ival = 0
 *         CHKERR( EPSGetIterationNumber(self.eps, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getConvergedReason(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1073
 *         CHKERR( EPSSolve(self.eps) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1088
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_104getConvergedReason[] = "EPS.getConvergedReason(self)\n\n        Gets the reason why the `solve()` iteration was stopped.\n\n        Returns\n        -------\n        reason: `EPS.ConvergedReason` enumerate\n                Negative value indicates diverged, positive value\n                converged.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_104getConvergedReason(struct PySlepcEPSObject *__pyx_v_self) {
  EPSConvergedReason __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergedReason", 0);

  /* "SLEPc/EPS.pyx":1098
 *                 converged.
 *         """
 *         cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetConvergedReason(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_CONVERGED_ITERATING;

  /* "SLEPc/EPS.pyx":1099
 *         """
 *         cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING
 *         CHKERR( EPSGetConvergedReason(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConvergedReason(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1099, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1100
 *         cdef SlepcEPSConvergedReason val = EPS_CONVERGED_ITERATING
 *         CHKERR( EPSGetConvergedReason(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def getConverged(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1088
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1102
 *         return val
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_106getConverged[] = "EPS.getConverged(self)\n\n        Gets the number of converged eigenpairs.\n\n        Returns\n        -------\n        nconv: int\n               Number of converged eigenpairs.\n\n        Notes\n        -----\n        This function should be called after `solve()` has finished.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConverged (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_106getConverged(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConverged", 0);

  /* "SLEPc/EPS.pyx":1115
 *         This function should be called after `solve()` has finished.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetConverged(self.eps, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/EPS.pyx":1116
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( EPSGetConverged(self.eps, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConverged(__pyx_v_self->eps, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1116, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1117
 *         cdef PetscInt ival = 0
 *         CHKERR( EPSGetConverged(self.eps, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getEigenvalue(self, int i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1102
 *         return val
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1119
 *         return toInt(ival)
 * 
 *     def getEigenvalue(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenvalue as computed by `solve()`.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_108getEigenvalue[] = "EPS.getEigenvalue(self, int i)\n\n        Gets the i-th eigenvalue as computed by `solve()`.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n\n        Returns\n        -------\n        e: scalar (possibly complex)\n           The computed eigenvalue.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n        according to the ordering criterion established with\n        `setWhichEigenpairs()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEigenvalue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenvalue") < 0)) __PYX_ERR(13, 1119, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1119, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEigenvalue", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_108getEigenvalue(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i) {
  PetscScalar __pyx_v_sval1;
  PetscScalar __pyx_v_sval2;
  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;
  __Pyx_RefNannySetupContext("getEigenvalue", 0);

  /* "SLEPc/EPS.pyx":1140
 *         `setWhichEigenpairs()`.
 *         """
 *         cdef PetscScalar sval1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar sval2 = 0
 *         CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) )
 */
  __pyx_v_sval1 = 0.0;

  /* "SLEPc/EPS.pyx":1141
 *         """
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) )
 *         return complex(toScalar(sval1), toScalar(sval2))
 */
  __pyx_v_sval2 = 0.0;

  /* "SLEPc/EPS.pyx":1142
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0
 *         CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) )             # <<<<<<<<<<<<<<
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenvalue(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1142, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1143
 *         cdef PetscScalar sval2 = 0
 *         CHKERR( EPSGetEigenvalue(self.eps, i, &sval1, &sval2) )
 *         return complex(toScalar(sval1), toScalar(sval2))             # <<<<<<<<<<<<<<
 * 
 *     def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1143, __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;

  /* "SLEPc/EPS.pyx":1119
 *         return toInt(ival)
 * 
 *     def getEigenvalue(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenvalue as computed by `solve()`.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1145
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenvector as computed by `solve()`.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_110getEigenvector[] = "EPS.getEigenvector(self, int i, Vec Vr, Vec Vi=None)\n\n        Gets the i-th eigenvector as computed by `solve()`.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n        Vr: Vec\n            Placeholder for the returned eigenvector (real part).\n        Vi: Vec, optional\n            Placeholder for the returned eigenvector (imaginary part).\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n        according to the ordering criterion established with\n        `setWhichEigenpairs()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_Vr = 0;
  struct PyPetscVecObject *__pyx_v_Vi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEigenvector (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0};
    PyObject* values[3] = {0,0,0};
    values[2] = (PyObject *)((struct PyPetscVecObject *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getEigenvector", 0, 2, 3, 1); __PYX_ERR(13, 1145, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenvector") < 0)) __PYX_ERR(13, 1145, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1145, __pyx_L3_error)
    __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEigenvector", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1145, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "Vr", 0))) __PYX_ERR(13, 1145, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(13, 1145, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_110getEigenvector(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) {
  Vec __pyx_v_vecr;
  Vec __pyx_v_veci;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("getEigenvector", 0);

  /* "SLEPc/EPS.pyx":1165
 *         `setWhichEigenpairs()`.
 *         """
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/EPS.pyx":1166
 *         """
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL             # <<<<<<<<<<<<<<
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 */
  __pyx_v_veci = NULL;

  /* "SLEPc/EPS.pyx":1167
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec             # <<<<<<<<<<<<<<
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_Vr->vec;
    __pyx_v_vecr = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1168
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_Vi->vec;
    __pyx_v_veci = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1169
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) )             # <<<<<<<<<<<<<<
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenvector(__pyx_v_self->eps, __pyx_v_i, __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1169, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1145
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getEigenvector(self, int i, Vec Vr not None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenvector as computed by `solve()`.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenvector", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1171
 *         CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) )
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_112getEigenpair[] = "EPS.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n        Gets the i-th solution of the eigenproblem as computed by\n        `solve()`.  The solution consists of both the eigenvalue and\n        the eigenvector.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n        Vr: Vec\n            Placeholder for the returned eigenvector (real part).\n        Vi: Vec\n            Placeholder for the returned eigenvector (imaginary part).\n\n        Returns\n        -------\n        e: scalar (possibly complex)\n           The computed eigenvalue.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`). Eigenpairs are indexed\n        according to the ordering criterion established with\n        `setWhichEigenpairs()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_Vr = 0;
  struct PyPetscVecObject *__pyx_v_Vi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[2] = (PyObject *)((struct PyPetscVecObject *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(13, 1171, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1171, __pyx_L3_error)
    __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1171, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(13, 1171, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(13, 1171, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_112getEigenpair(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) {
  PetscScalar __pyx_v_sval1;
  PetscScalar __pyx_v_sval2;
  Vec __pyx_v_vecr;
  Vec __pyx_v_veci;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("getEigenpair", 0);

  /* "SLEPc/EPS.pyx":1198
 *         `setWhichEigenpairs()`.
 *         """
 *         cdef PetscScalar sval1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 */
  __pyx_v_sval1 = 0.0;

  /* "SLEPc/EPS.pyx":1199
 *         """
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 */
  __pyx_v_sval2 = 0.0;

  /* "SLEPc/EPS.pyx":1200
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/EPS.pyx":1201
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL             # <<<<<<<<<<<<<<
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 */
  __pyx_v_veci = NULL;

  /* "SLEPc/EPS.pyx":1202
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec             # <<<<<<<<<<<<<<
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_Vr->vec;
    __pyx_v_vecr = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1203
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_Vi->vec;
    __pyx_v_veci = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1204
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) )             # <<<<<<<<<<<<<<
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetEigenpair(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1204, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1205
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( EPSGetEigenpair(self.eps, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))             # <<<<<<<<<<<<<<
 * 
 *     def getInvariantSubspace(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(13, 1205, __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 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(13, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1171
 *         CHKERR( EPSGetEigenvector(self.eps, i, vecr, veci) )
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1207
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getInvariantSubspace(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets an orthonormal basis of the computed invariant subspace.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace[] = "EPS.getInvariantSubspace(self)\n\n        Gets an orthonormal basis of the computed invariant subspace.\n\n        Returns\n        -------\n        subspace: list of Vec\n           Basis of the invariant subspace.\n\n        Notes\n        -----\n        This function should be called after `solve()` has finished.\n\n        The returned vectors span an invariant subspace associated\n        with the computed eigenvalues. An invariant subspace ``X`` of\n        ``A` satisfies ``A x`` in ``X`` for all ``x`` in ``X`` (a\n        similar definition applies for generalized eigenproblems).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getInvariantSubspace (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getInvariantSubspace", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getInvariantSubspace", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_i;
  PetscInt __pyx_v_ncv;
  Vec __pyx_v_v;
  Vec *__pyx_v_isp;
  PyObject *__pyx_v_subspace = 0;
  Mat __pyx_v_A;
  struct PyPetscVecObject *__pyx_v_V = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PetscInt __pyx_t_4;
  PetscInt __pyx_t_5;
  int __pyx_t_6;
  __Pyx_RefNannySetupContext("getInvariantSubspace", 0);

  /* "SLEPc/EPS.pyx":1225
 *         similar definition applies for generalized eigenproblems).
 *         """
 *         cdef PetscInt i = 0, ncv = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec v = NULL, *isp = NULL
 *         cdef list subspace = []
 */
  __pyx_v_i = 0;
  __pyx_v_ncv = 0;

  /* "SLEPc/EPS.pyx":1226
 *         """
 *         cdef PetscInt i = 0, ncv = 0
 *         cdef PetscVec v = NULL, *isp = NULL             # <<<<<<<<<<<<<<
 *         cdef list subspace = []
 *         CHKERR( EPSGetConverged(self.eps, &ncv) )
 */
  __pyx_v_v = NULL;
  __pyx_v_isp = NULL;

  /* "SLEPc/EPS.pyx":1227
 *         cdef PetscInt i = 0, ncv = 0
 *         cdef PetscVec v = NULL, *isp = NULL
 *         cdef list subspace = []             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetConverged(self.eps, &ncv) )
 *         if ncv == 0: return subspace
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_subspace = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":1228
 *         cdef PetscVec v = NULL, *isp = NULL
 *         cdef list subspace = []
 *         CHKERR( EPSGetConverged(self.eps, &ncv) )             # <<<<<<<<<<<<<<
 *         if ncv == 0: return subspace
 *         cdef PetscMat A = NULL
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetConverged(__pyx_v_self->eps, (&__pyx_v_ncv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1228, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1229
 *         cdef list subspace = []
 *         CHKERR( EPSGetConverged(self.eps, &ncv) )
 *         if ncv == 0: return subspace             # <<<<<<<<<<<<<<
 *         cdef PetscMat A = NULL
 *         CHKERR( EPSGetOperators(self.eps, &A, NULL) )
 */
  __pyx_t_3 = ((__pyx_v_ncv == 0) != 0);
  if (__pyx_t_3) {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_subspace);
    __pyx_r = __pyx_v_subspace;
    goto __pyx_L0;
  }

  /* "SLEPc/EPS.pyx":1230
 *         CHKERR( EPSGetConverged(self.eps, &ncv) )
 *         if ncv == 0: return subspace
 *         cdef PetscMat A = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetOperators(self.eps, &A, NULL) )
 *         CHKERR( MatCreateVecs(A, &v, NULL) )
 */
  __pyx_v_A = NULL;

  /* "SLEPc/EPS.pyx":1231
 *         if ncv == 0: return subspace
 *         cdef PetscMat A = NULL
 *         CHKERR( EPSGetOperators(self.eps, &A, NULL) )             # <<<<<<<<<<<<<<
 *         CHKERR( MatCreateVecs(A, &v, NULL) )
 *         cdef Vec V = None
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetOperators(__pyx_v_self->eps, (&__pyx_v_A), NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1231, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1232
 *         cdef PetscMat A = NULL
 *         CHKERR( EPSGetOperators(self.eps, &A, NULL) )
 *         CHKERR( MatCreateVecs(A, &v, NULL) )             # <<<<<<<<<<<<<<
 *         cdef Vec V = None
 *         cdef object tmp = allocate(ncv*sizeof(Vec),<void**>&isp)
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MatCreateVecs(__pyx_v_A, (&__pyx_v_v), NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1232, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1233
 *         CHKERR( EPSGetOperators(self.eps, &A, NULL) )
 *         CHKERR( MatCreateVecs(A, &v, NULL) )
 *         cdef Vec V = None             # <<<<<<<<<<<<<<
 *         cdef object tmp = allocate(ncv*sizeof(Vec),<void**>&isp)
 *         for i in range(ncv):
 */
  __Pyx_INCREF(Py_None);
  __pyx_v_V = ((struct PyPetscVecObject *)Py_None);

  /* "SLEPc/EPS.pyx":1234
 *         CHKERR( MatCreateVecs(A, &v, NULL) )
 *         cdef Vec V = None
 *         cdef object tmp = allocate(ncv*sizeof(Vec),<void**>&isp)             # <<<<<<<<<<<<<<
 *         for i in range(ncv):
 *             if i == 0: isp[0] = v
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_ncv * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_isp))); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":1235
 *         cdef Vec V = None
 *         cdef object tmp = allocate(ncv*sizeof(Vec),<void**>&isp)
 *         for i in range(ncv):             # <<<<<<<<<<<<<<
 *             if i == 0: isp[0] = v
 *             if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) )
 */
  __pyx_t_4 = __pyx_v_ncv;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "SLEPc/EPS.pyx":1236
 *         cdef object tmp = allocate(ncv*sizeof(Vec),<void**>&isp)
 *         for i in range(ncv):
 *             if i == 0: isp[0] = v             # <<<<<<<<<<<<<<
 *             if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) )
 *             V = Vec(); V.vec = isp[i]; subspace.append(V)
 */
    __pyx_t_3 = ((__pyx_v_i == 0) != 0);
    if (__pyx_t_3) {
      (__pyx_v_isp[0]) = __pyx_v_v;
    }

    /* "SLEPc/EPS.pyx":1237
 *         for i in range(ncv):
 *             if i == 0: isp[0] = v
 *             if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) )             # <<<<<<<<<<<<<<
 *             V = Vec(); V.vec = isp[i]; subspace.append(V)
 *         CHKERR( EPSGetInvariantSubspace(self.eps, isp) )
 */
    __pyx_t_3 = ((__pyx_v_i >= 1) != 0);
    if (__pyx_t_3) {
      __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDuplicate(__pyx_v_v, (&(__pyx_v_isp[__pyx_v_i])))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1237, __pyx_L1_error)
    }

    /* "SLEPc/EPS.pyx":1238
 *             if i == 0: isp[0] = v
 *             if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) )
 *             V = Vec(); V.vec = isp[i]; subspace.append(V)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetInvariantSubspace(self.eps, isp) )
 *         return subspace
 */
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_V, ((struct PyPetscVecObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    __pyx_v_V->vec = (__pyx_v_isp[__pyx_v_i]);
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_subspace, ((PyObject *)__pyx_v_V)); if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(13, 1238, __pyx_L1_error)
  }

  /* "SLEPc/EPS.pyx":1239
 *             if i >= 1: CHKERR( VecDuplicate(v, &isp[i]) )
 *             V = Vec(); V.vec = isp[i]; subspace.append(V)
 *         CHKERR( EPSGetInvariantSubspace(self.eps, isp) )             # <<<<<<<<<<<<<<
 *         return subspace
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetInvariantSubspace(__pyx_v_self->eps, __pyx_v_isp)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1239, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1240
 *             V = Vec(); V.vec = isp[i]; subspace.append(V)
 *         CHKERR( EPSGetInvariantSubspace(self.eps, isp) )
 *         return subspace             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_subspace);
  __pyx_r = __pyx_v_subspace;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1207
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getInvariantSubspace(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets an orthonormal basis of the computed invariant subspace.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getInvariantSubspace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_subspace);
  __Pyx_XDECREF((PyObject *)__pyx_v_V);
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1244
 *     #
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_116getErrorEstimate[] = "EPS.getErrorEstimate(self, int i)\n\n        Returns the error estimate associated to the i-th computed\n        eigenpair.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be considered.\n\n        Returns\n        -------\n        e: real\n           Error estimate.\n\n        Notes\n        -----\n        This is the error estimate used internally by the\n        eigensolver. The actual error bound can be computed with\n        `computeError()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(13, 1244, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1244, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1244, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_116getErrorEstimate(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i) {
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getErrorEstimate", 0);

  /* "SLEPc/EPS.pyx":1265
 *         `computeError()`.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) )
 *         return toReal(rval)
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/EPS.pyx":1266
 *         """
 *         cdef PetscReal rval = 0
 *         CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSGetErrorEstimate(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1266, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1267
 *         cdef PetscReal rval = 0
 *         CHKERR( EPSGetErrorEstimate(self.eps, i, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def computeError(self, int i, etype=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1244
 *     #
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1269
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_118computeError[] = "EPS.computeError(self, int i, etype=None)\n\n        Computes the error (based on the residual norm) associated with the i-th\n        computed eigenpair.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be considered.\n        etype: `EPS.ErrorType` enumerate\n           The error type to compute.\n\n        Returns\n        -------\n        e: real\n           The error bound, computed in various ways from the residual norm\n           ``||Ax-kBx||_2`` where ``k`` is the eigenvalue and\n           ``x`` is the eigenvector.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_v_etype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeError (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(13, 1269, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1269, __pyx_L3_error)
    __pyx_v_etype = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1269, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_118computeError(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) {
  EPSErrorType __pyx_v_et;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  EPSErrorType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("computeError", 0);

  /* "SLEPc/EPS.pyx":1293
 *         ``nconv-1`` (see `getConverged()`).
 *         """
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 */
  __pyx_v_et = EPS_ERROR_RELATIVE;

  /* "SLEPc/EPS.pyx":1294
 *         """
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         CHKERR( EPSComputeError(self.eps, i, et, &rval) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/EPS.pyx":1295
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         CHKERR( EPSComputeError(self.eps, i, et, &rval) )
 *         return toReal(rval)
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((EPSErrorType)__Pyx_PyInt_As_EPSErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1295, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1296
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 *         CHKERR( EPSComputeError(self.eps, i, et, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSComputeError(__pyx_v_self->eps, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1296, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1297
 *         if etype is not None: et = etype
 *         CHKERR( EPSComputeError(self.eps, i, et, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1269
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1299
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_120errorView[] = "EPS.errorView(self, etype=None, Viewer viewer=None)\n\n        Displays the errors associated with the computed solution\n        (as well as the eigenvalues).\n\n        Parameters\n        ----------\n        etype: `EPS.ErrorType` enumerate, optional\n           The error type to compute.\n        viewer: Viewer, optional.\n                Visualization context; if not provided, the standard\n                output is used.\n\n        Notes\n        -----\n        By default, this function checks the error of all eigenpairs and prints\n        the eigenvalues if all of them are below the requested tolerance.\n        If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n        eigenvalues and corresponding errors is printed.\n\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_etype = 0;
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("errorView (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = (PyObject *)((struct PyPetscViewerObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(13, 1299, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_etype = values[0];
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1299, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(13, 1299, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_120errorView(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) {
  EPSErrorType __pyx_v_et;
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  EPSErrorType __pyx_t_3;
  PetscViewer __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("errorView", 0);

  /* "SLEPc/EPS.pyx":1320
 * 
 *         """
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 */
  __pyx_v_et = EPS_ERROR_RELATIVE;

  /* "SLEPc/EPS.pyx":1321
 *         """
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((EPSErrorType)__Pyx_PyInt_As_EPSErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1321, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1322
 *         cdef SlepcEPSErrorType et = EPS_ERROR_RELATIVE
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( EPSErrorView(self.eps, et, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/EPS.pyx":1323
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( EPSErrorView(self.eps, et, vwr) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_4;
  }

  /* "SLEPc/EPS.pyx":1324
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( EPSErrorView(self.eps, et, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSErrorView(__pyx_v_self->eps, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(13, 1324, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1299
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1328
 *     #
 * 
 *     def setPowerShiftType(self, shift):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the type of shifts used during the power iteration. This
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_122setPowerShiftType[] = "EPS.setPowerShiftType(self, shift)\n\n        Sets the type of shifts used during the power iteration. This\n        can be used to emulate the Rayleigh Quotient Iteration (RQI)\n        method.\n\n        Parameters\n        ----------\n        shift: `EPS.PowerShiftType` enumerate\n               The type of shift.\n\n        Notes\n        -----\n        This call is only relevant if the type was set to\n        `EPS.Type.POWER` with `setType()`.\n\n        By default, shifts are constant\n        (`EPS.PowerShiftType.CONSTANT`) and the iteration is the\n        simple power method (or inverse iteration if a\n        shift-and-invert transformation is being used).\n\n        A variable shift can be specified\n        (`EPS.PowerShiftType.RAYLEIGH` or\n        `EPS.PowerShiftType.WILKINSON`). In this case, the iteration\n        behaves rather like a cubic converging method as RQI.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_shift = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setPowerShiftType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shift,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_shift)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPowerShiftType") < 0)) __PYX_ERR(13, 1328, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_shift = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setPowerShiftType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1328, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_shift);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_122setPowerShiftType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_shift) {
  EPSPowerShiftType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSPowerShiftType __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setPowerShiftType", 0);

  /* "SLEPc/EPS.pyx":1354
 *         behaves rather like a cubic converging method as RQI.
 *         """
 *         cdef SlepcEPSPowerShiftType val = shift             # <<<<<<<<<<<<<<
 *         CHKERR( EPSPowerSetShiftType(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((EPSPowerShiftType)__Pyx_PyInt_As_EPSPowerShiftType(__pyx_v_shift)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1354, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1355
 *         """
 *         cdef SlepcEPSPowerShiftType val = shift
 *         CHKERR( EPSPowerSetShiftType(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getPowerShiftType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSPowerSetShiftType(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1355, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1328
 *     #
 * 
 *     def setPowerShiftType(self, shift):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the type of shifts used during the power iteration. This
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1357
 *         CHKERR( EPSPowerSetShiftType(self.eps, val) )
 * 
 *     def getPowerShiftType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of shifts used during the power iteration.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_124getPowerShiftType[] = "EPS.getPowerShiftType(self)\n\n        Gets the type of shifts used during the power iteration.\n\n        Returns\n        -------\n        shift: `EPS.PowerShiftType` enumerate\n               The type of shift.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPowerShiftType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getPowerShiftType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getPowerShiftType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_124getPowerShiftType(struct PySlepcEPSObject *__pyx_v_self) {
  EPSPowerShiftType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getPowerShiftType", 0);

  /* "SLEPc/EPS.pyx":1366
 *                The type of shift.
 *         """
 *         cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT             # <<<<<<<<<<<<<<
 *         CHKERR( EPSPowerGetShiftType(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_POWER_SHIFT_CONSTANT;

  /* "SLEPc/EPS.pyx":1367
 *         """
 *         cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT
 *         CHKERR( EPSPowerGetShiftType(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSPowerGetShiftType(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1367, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1368
 *         cdef SlepcEPSPowerShiftType val = EPS_POWER_SHIFT_CONSTANT
 *         CHKERR( EPSPowerGetShiftType(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setArnoldiDelayed(self, delayed):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSPowerShiftType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1357
 *         CHKERR( EPSPowerSetShiftType(self.eps, val) )
 * 
 *     def getPowerShiftType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of shifts used during the power iteration.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getPowerShiftType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1370
 *         return val
 * 
 *     def setArnoldiDelayed(self, delayed):             # <<<<<<<<<<<<<<
 *         """
 *         Activates or deactivates delayed reorthogonalization in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed[] = "EPS.setArnoldiDelayed(self, delayed)\n\n        Activates or deactivates delayed reorthogonalization in the\n        Arnoldi iteration.\n\n        Parameters\n        ----------\n        delayed: boolean\n                 True if delayed reorthogonalization is to be used.\n\n        Notes\n        -----\n        This call is only relevant if the type was set to\n        `EPS.Type.ARNOLDI` with `setType()`.\n\n        Delayed reorthogonalization is an aggressive optimization for\n        the Arnoldi eigensolver than may provide better scalability,\n        but sometimes makes the solver converge less than the default\n        algorithm.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_delayed = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setArnoldiDelayed (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_delayed,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delayed)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setArnoldiDelayed") < 0)) __PYX_ERR(13, 1370, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_delayed = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setArnoldiDelayed", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1370, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_delayed);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_delayed) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setArnoldiDelayed", 0);

  /* "SLEPc/EPS.pyx":1390
 *         algorithm.
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if delayed: val = PETSC_TRUE
 *         CHKERR( EPSArnoldiSetDelayed(self.eps, val) )
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":1391
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         if delayed: val = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSArnoldiSetDelayed(self.eps, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_delayed); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(13, 1391, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_val = PETSC_TRUE;
  }

  /* "SLEPc/EPS.pyx":1392
 *         cdef PetscBool val = PETSC_FALSE
 *         if delayed: val = PETSC_TRUE
 *         CHKERR( EPSArnoldiSetDelayed(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getArnoldiDelayed(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSArnoldiSetDelayed(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1392, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1370
 *         return val
 * 
 *     def setArnoldiDelayed(self, delayed):             # <<<<<<<<<<<<<<
 *         """
 *         Activates or deactivates delayed reorthogonalization in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1394
 *         CHKERR( EPSArnoldiSetDelayed(self.eps, val) )
 * 
 *     def getArnoldiDelayed(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of reorthogonalization used during the Arnoldi
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed[] = "EPS.getArnoldiDelayed(self)\n\n        Gets the type of reorthogonalization used during the Arnoldi\n        iteration.\n\n        Returns\n        -------\n        delayed: boolean\n                 True if delayed reorthogonalization is to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getArnoldiDelayed (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getArnoldiDelayed", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getArnoldiDelayed", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getArnoldiDelayed", 0);

  /* "SLEPc/EPS.pyx":1404
 *                  True if delayed reorthogonalization is to be used.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":1405
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSArnoldiGetDelayed(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1405, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1406
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSArnoldiGetDelayed(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def setLanczosReorthogType(self, reorthog):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1394
 *         CHKERR( EPSArnoldiSetDelayed(self.eps, val) )
 * 
 *     def getArnoldiDelayed(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of reorthogonalization used during the Arnoldi
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getArnoldiDelayed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1408
 *         return <bint> tval
 * 
 *     def setLanczosReorthogType(self, reorthog):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the type of reorthogonalization used during the Lanczos
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType[] = "EPS.setLanczosReorthogType(self, reorthog)\n\n        Sets the type of reorthogonalization used during the Lanczos\n        iteration.\n\n        Parameters\n        ----------\n        reorthog: `EPS.LanczosReorthogType` enumerate\n                  The type of reorthogonalization.\n\n        Notes\n        -----\n        This call is only relevant if the type was set to\n        `EPS.Type.LANCZOS` with `setType()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_reorthog = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLanczosReorthogType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reorthog,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reorthog)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLanczosReorthogType") < 0)) __PYX_ERR(13, 1408, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_reorthog = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLanczosReorthogType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1408, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_reorthog);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_reorthog) {
  EPSLanczosReorthogType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  EPSLanczosReorthogType __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setLanczosReorthogType", 0);

  /* "SLEPc/EPS.pyx":1423
 *         `EPS.Type.LANCZOS` with `setType()`.
 *         """
 *         cdef SlepcEPSLanczosReorthogType val = reorthog             # <<<<<<<<<<<<<<
 *         CHKERR( EPSLanczosSetReorthog(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((EPSLanczosReorthogType)__Pyx_PyInt_As_EPSLanczosReorthogType(__pyx_v_reorthog)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1423, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1424
 *         """
 *         cdef SlepcEPSLanczosReorthogType val = reorthog
 *         CHKERR( EPSLanczosSetReorthog(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getLanczosReorthogType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSLanczosSetReorthog(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1424, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1408
 *         return <bint> tval
 * 
 *     def setLanczosReorthogType(self, reorthog):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the type of reorthogonalization used during the Lanczos
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1426
 *         CHKERR( EPSLanczosSetReorthog(self.eps, val) )
 * 
 *     def getLanczosReorthogType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of reorthogonalization used during the Lanczos
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType[] = "EPS.getLanczosReorthogType(self)\n\n        Gets the type of reorthogonalization used during the Lanczos\n        iteration.\n\n        Returns\n        -------\n        reorthog: `EPS.LanczosReorthogType` enumerate\n                  The type of reorthogonalization.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLanczosReorthogType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getLanczosReorthogType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLanczosReorthogType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType(struct PySlepcEPSObject *__pyx_v_self) {
  EPSLanczosReorthogType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getLanczosReorthogType", 0);

  /* "SLEPc/EPS.pyx":1437
 *         """
 *         cdef SlepcEPSLanczosReorthogType val = \
 *             EPS_LANCZOS_REORTHOG_LOCAL             # <<<<<<<<<<<<<<
 *         CHKERR( EPSLanczosGetReorthog(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = EPS_LANCZOS_REORTHOG_LOCAL;

  /* "SLEPc/EPS.pyx":1438
 *         cdef SlepcEPSLanczosReorthogType val = \
 *             EPS_LANCZOS_REORTHOG_LOCAL
 *         CHKERR( EPSLanczosGetReorthog(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSLanczosGetReorthog(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1438, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1439
 *             EPS_LANCZOS_REORTHOG_LOCAL
 *         CHKERR( EPSLanczosGetReorthog(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_EPSLanczosReorthogType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1426
 *         CHKERR( EPSLanczosSetReorthog(self.eps, val) )
 * 
 *     def getLanczosReorthogType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of reorthogonalization used during the Lanczos
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getLanczosReorthogType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1443
 *     #
 * 
 *     def setKrylovSchurRestart(self, keep):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the restart parameter for the Krylov-Schur method, in
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart[] = "EPS.setKrylovSchurRestart(self, keep)\n\n        Sets the restart parameter for the Krylov-Schur method, in\n        particular the proportion of basis vectors that must be kept\n        after restart.\n\n        Parameters\n        ----------\n        keep: float\n              The number of vectors to be kept at restart.\n\n        Notes\n        -----\n        Allowed values are in the range [0.1,0.9]. The default is 0.5.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_keep = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurRestart (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keep,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_keep)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurRestart") < 0)) __PYX_ERR(13, 1443, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_keep = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurRestart", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1443, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_keep);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_keep) {
  PetscReal __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscReal __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setKrylovSchurRestart", 0);

  /* "SLEPc/EPS.pyx":1458
 *         Allowed values are in the range [0.1,0.9]. The default is 0.5.
 *         """
 *         cdef PetscReal val = keep             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurSetRestart(self.eps, val) )
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_keep); if (unlikely((__pyx_t_1 == (PetscReal)-1) && PyErr_Occurred())) __PYX_ERR(13, 1458, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1459
 *         """
 *         cdef PetscReal val = keep
 *         CHKERR( EPSKrylovSchurSetRestart(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurRestart(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetRestart(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1459, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1443
 *     #
 * 
 *     def setKrylovSchurRestart(self, keep):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the restart parameter for the Krylov-Schur method, in
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1461
 *         CHKERR( EPSKrylovSchurSetRestart(self.eps, val) )
 * 
 *     def getKrylovSchurRestart(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the restart parameter used in the Krylov-Schur method.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart[] = "EPS.getKrylovSchurRestart(self)\n\n        Gets the restart parameter used in the Krylov-Schur method.\n\n        Returns\n        -------\n        keep: float\n              The number of vectors to be kept at restart.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurRestart (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurRestart", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurRestart", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart(struct PySlepcEPSObject *__pyx_v_self) {
  PetscReal __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getKrylovSchurRestart", 0);

  /* "SLEPc/EPS.pyx":1470
 *               The number of vectors to be kept at restart.
 *         """
 *         cdef PetscReal val = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = 0.0;

  /* "SLEPc/EPS.pyx":1471
 *         """
 *         cdef PetscReal val = 0
 *         CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetRestart(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1471, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1472
 *         cdef PetscReal val = 0
 *         CHKERR( EPSKrylovSchurGetRestart(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setKrylovSchurLocking(self, lock):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1461
 *         CHKERR( EPSKrylovSchurSetRestart(self.eps, val) )
 * 
 *     def getKrylovSchurRestart(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the restart parameter used in the Krylov-Schur method.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurRestart", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1474
 *         return val
 * 
 *     def setKrylovSchurLocking(self, lock):             # <<<<<<<<<<<<<<
 *         """
 *         Choose between locking and non-locking variants of the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking[] = "EPS.setKrylovSchurLocking(self, lock)\n\n        Choose between locking and non-locking variants of the\n        Krylov-Schur method.\n\n        Parameters\n        ----------\n        lock: bool\n              True if the locking variant must be selected.\n\n        Notes\n        -----\n        The default is to lock converged eigenpairs when the method restarts.\n        This behaviour can be changed so that all directions are kept in the\n        working subspace even if already converged to working accuracy (the\n        non-locking variant).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lock = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurLocking (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lock,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lock)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurLocking") < 0)) __PYX_ERR(13, 1474, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_lock = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurLocking", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1474, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_lock);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_lock) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setKrylovSchurLocking", 0);

  /* "SLEPc/EPS.pyx":1491
 *         non-locking variant).
 *         """
 *         cdef PetscBool val = lock             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurSetLocking(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_lock)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1491, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1492
 *         """
 *         cdef PetscBool val = lock
 *         CHKERR( EPSKrylovSchurSetLocking(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurLocking(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetLocking(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1492, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1474
 *         return val
 * 
 *     def setKrylovSchurLocking(self, lock):             # <<<<<<<<<<<<<<
 *         """
 *         Choose between locking and non-locking variants of the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1494
 *         CHKERR( EPSKrylovSchurSetLocking(self.eps, val) )
 * 
 *     def getKrylovSchurLocking(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the locking flag used in the Krylov-Schur method.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking[] = "EPS.getKrylovSchurLocking(self)\n\n        Gets the locking flag used in the Krylov-Schur method.\n\n        Returns\n        -------\n        lock: bool\n              The locking flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurLocking (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurLocking", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurLocking", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getKrylovSchurLocking", 0);

  /* "SLEPc/EPS.pyx":1503
 *               The locking flag.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":1504
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetLocking(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1504, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1505
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSKrylovSchurGetLocking(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def setKrylovSchurPartitions(self, npart):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1494
 *         CHKERR( EPSKrylovSchurSetLocking(self.eps, val) )
 * 
 *     def getKrylovSchurLocking(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the locking flag used in the Krylov-Schur method.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurLocking", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1507
 *         return <bint> tval
 * 
 *     def setKrylovSchurPartitions(self, npart):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of partitions for the case of doing spectrum
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions[] = "EPS.setKrylovSchurPartitions(self, npart)\n\n        Sets the number of partitions for the case of doing spectrum\n        slicing for a computational interval with the communicator split\n        in several sub-communicators.\n\n        Parameters\n        ----------\n        npart: int\n              The number of partitions.\n\n        Notes\n        -----\n        By default, npart=1 so all processes in the communicator participate in\n        the processing of the whole interval. If npart>1 then the interval is\n        divided into npart subintervals, each of them being processed by a\n        subset of processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_npart = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurPartitions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_npart,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_npart)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurPartitions") < 0)) __PYX_ERR(13, 1507, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_npart = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurPartitions", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1507, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_npart);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_npart) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setKrylovSchurPartitions", 0);

  /* "SLEPc/EPS.pyx":1525
 *         subset of processes.
 *         """
 *         cdef PetscInt val = npart             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_npart); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(13, 1525, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1526
 *         """
 *         cdef PetscInt val = npart
 *         CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurPartitions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetPartitions(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1526, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1507
 *         return <bint> tval
 * 
 *     def setKrylovSchurPartitions(self, npart):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of partitions for the case of doing spectrum
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1528
 *         CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) )
 * 
 *     def getKrylovSchurPartitions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of partitions of the communicator in case of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions[] = "EPS.getKrylovSchurPartitions(self)\n\n        Gets the number of partitions of the communicator in case of\n        spectrum slicing.\n\n        Returns\n        -------\n        npart: int\n              The number of partitions.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurPartitions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurPartitions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurPartitions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getKrylovSchurPartitions", 0);

  /* "SLEPc/EPS.pyx":1538
 *               The number of partitions.
 *         """
 *         cdef PetscInt val = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = 0;

  /* "SLEPc/EPS.pyx":1539
 *         """
 *         cdef PetscInt val = 0
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetPartitions(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1539, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1540
 *         cdef PetscInt val = 0
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setKrylovSchurDetectZeros(self, detect):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1528
 *         CHKERR( EPSKrylovSchurSetPartitions(self.eps, val) )
 * 
 *     def getKrylovSchurPartitions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of partitions of the communicator in case of
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurPartitions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1542
 *         return val
 * 
 *     def setKrylovSchurDetectZeros(self, detect):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to enforce detection of zeros during the factorizations
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros[] = "EPS.setKrylovSchurDetectZeros(self, detect)\n\n        Sets a flag to enforce detection of zeros during the factorizations\n        throughout the spectrum slicing computation.\n\n        Parameters\n        ----------\n        detect: bool\n              True if zeros must checked for.\n\n        Notes\n        -----\n        A zero in the factorization indicates that a shift coincides with\n        an eigenvalue.\n\n        This flag is turned off by default, and may be necessary in some cases,\n        especially when several partitions are being used. This feature currently\n        requires an external package for factorizations with support for zero\n        detection, e.g. MUMPS.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_detect = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurDetectZeros (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_detect,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_detect)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurDetectZeros") < 0)) __PYX_ERR(13, 1542, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_detect = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurDetectZeros", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1542, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_detect);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_detect) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setKrylovSchurDetectZeros", 0);

  /* "SLEPc/EPS.pyx":1562
 *         detection, e.g. MUMPS.
 *         """
 *         cdef PetscBool val = detect             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_detect)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1562, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1563
 *         """
 *         cdef PetscBool val = detect
 *         CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurDetectZeros(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetDetectZeros(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1563, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1542
 *         return val
 * 
 *     def setKrylovSchurDetectZeros(self, detect):             # <<<<<<<<<<<<<<
 *         """
 *         Sets a flag to enforce detection of zeros during the factorizations
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1565
 *         CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) )
 * 
 *     def getKrylovSchurDetectZeros(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the flag that enforces zero detection in spectrum slicing.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros[] = "EPS.getKrylovSchurDetectZeros(self)\n\n        Gets the flag that enforces zero detection in spectrum slicing.\n\n        Returns\n        -------\n        detect: bool\n              The zero detection flag.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurDetectZeros (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurDetectZeros", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurDetectZeros", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros(struct PySlepcEPSObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getKrylovSchurDetectZeros", 0);

  /* "SLEPc/EPS.pyx":1574
 *               The zero detection flag.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) )
 *         return <bint> tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":1575
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint> tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetDetectZeros(__pyx_v_self->eps, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1575, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1576
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( EPSKrylovSchurGetDetectZeros(self.eps, &tval) )
 *         return <bint> tval             # <<<<<<<<<<<<<<
 * 
 *     def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1565
 *         CHKERR( EPSKrylovSchurSetDetectZeros(self.eps, val) )
 * 
 *     def getKrylovSchurDetectZeros(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the flag that enforces zero detection in spectrum slicing.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurDetectZeros", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1578
 *         return <bint> tval
 * 
 *     def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the dimensions used for each subsolve step in case of doing
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions[] = "EPS.setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None)\n\n        Sets the dimensions used for each subsolve step in case of doing\n        spectrum slicing for a computational interval. The meaning of the\n        parameters is the same as in `setDimensions()`.\n\n        Parameters\n        ----------\n        nev: int, optional\n             Number of eigenvalues to compute.\n        ncv: int, optional\n             Maximum dimension of the subspace to be used by the solver.\n        mpd: int, optional\n             Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nev = 0;
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_v_mpd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurDimensions") < 0)) __PYX_ERR(13, 1578, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_nev = values[0];
    __pyx_v_ncv = values[1];
    __pyx_v_mpd = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1578, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setKrylovSchurDimensions", 0);

  /* "SLEPc/EPS.pyx":1593
 *              Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":1594
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":1595
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 */
  __pyx_v_ival3 = PETSC_DEFAULT;

  /* "SLEPc/EPS.pyx":1596
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)             # <<<<<<<<<<<<<<
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 */
  __pyx_t_1 = (__pyx_v_nev != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1596, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1597
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)             # <<<<<<<<<<<<<<
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) )
 */
  __pyx_t_2 = (__pyx_v_ncv != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1597, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1598
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 */
  __pyx_t_1 = (__pyx_v_mpd != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(13, 1598, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1599
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) )             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurDimensions(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetDimensions(__pyx_v_self->eps, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1599, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1578
 *         return <bint> tval
 * 
 *     def setKrylovSchurDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the dimensions used for each subsolve step in case of doing
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1601
 *         CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 *     def getKrylovSchurDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the dimensions used for each subsolve step in case of doing
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions[] = "EPS.getKrylovSchurDimensions(self)\n\n        Gets the dimensions used for each subsolve step in case of doing\n        spectrum slicing for a computational interval.\n\n        Returns\n        -------\n        nev: int\n             Number of eigenvalues to compute.\n        ncv: int\n             Maximum dimension of the subspace to be used by the solver.\n        mpd: int\n             Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  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;
  __Pyx_RefNannySetupContext("getKrylovSchurDimensions", 0);

  /* "SLEPc/EPS.pyx":1615
 *              Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/EPS.pyx":1616
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/EPS.pyx":1617
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/EPS.pyx":1618
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetDimensions(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1618, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1619
 *         cdef PetscInt ival3 = 0
 *         CHKERR( EPSKrylovSchurGetDimensions(self.eps, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurSubcommInfo(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1601
 *         CHKERR( EPSKrylovSchurSetDimensions(self.eps, ival1, ival2, ival3) )
 * 
 *     def getKrylovSchurDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the dimensions used for each subsolve step in case of doing
 */

  /* 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_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1621
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def getKrylovSchurSubcommInfo(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets information related to the case of doing spectrum slicing
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo[] = "EPS.getKrylovSchurSubcommInfo(self)\n\n        Gets information related to the case of doing spectrum slicing\n        for a computational interval with multiple communicators.\n\n        Returns\n        -------\n        k: int\n             Number of the subinterval for the calling process.\n        n: int\n             Number of eigenvalues found in the k-th subinterval.\n        v: Vec\n             A vector owned by processes in the subcommunicator with dimensions\n             compatible for locally computed eigenvectors.\n\n        Notes\n        -----\n        This function is only available for spectrum slicing runs.\n\n        The returned Vec should be destroyed by the user.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommInfo (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommInfo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurSubcommInfo", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  struct PyPetscVecObject *__pyx_v_vec = 0;
  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;
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommInfo", 0);

  /* "SLEPc/EPS.pyx":1642
 *         The returned Vec should be destroyed by the user.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef Vec vec
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/EPS.pyx":1643
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef Vec vec
 *         vec = Vec()
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/EPS.pyx":1645
 *         cdef PetscInt ival2 = 0
 *         cdef Vec vec
 *         vec = Vec()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) )
 *         return (toInt(ival1), toInt(ival2), vec)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Vec), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_vec = ((struct PyPetscVecObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":1646
 *         cdef Vec vec
 *         vec = Vec()
 *         CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), vec)
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommInfo(__pyx_v_self->eps, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_vec->vec))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1646, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1647
 *         vec = Vec()
 *         CHKERR( EPSKrylovSchurGetSubcommInfo(self.eps, &ival1, &ival2, &vec.vec) )
 *         return (toInt(ival1), toInt(ival2), vec)             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurSubcommPairs(self, int i, Vec V):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vec));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_vec));
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1621
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def getKrylovSchurSubcommInfo(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets information related to the case of doing spectrum slicing
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1649
 *         return (toInt(ival1), toInt(ival2), vec)
 * 
 *     def getKrylovSchurSubcommPairs(self, int i, Vec V):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenpair stored internally in the multi-communicator
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs[] = "EPS.getKrylovSchurSubcommPairs(self, int i, Vec V)\n\n        Gets the i-th eigenpair stored internally in the multi-communicator\n        to which the calling process belongs.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n        V: Vec\n           Placeholder for the returned eigenvector.\n\n        Returns\n        -------\n        e: scalar\n           The computed eigenvalue.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and ``n-1``,\n        where ``n`` is the number of vectors in the local subinterval,\n        see `getKrylovSchurSubcommInfo()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_V = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommPairs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_V,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommPairs", 1, 2, 2, 1); __PYX_ERR(13, 1649, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getKrylovSchurSubcommPairs") < 0)) __PYX_ERR(13, 1649, __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 1649, __pyx_L3_error)
    __pyx_v_V = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommPairs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1649, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommPairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "V", 0))) __PYX_ERR(13, 1649, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_i, __pyx_v_V);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs(struct PySlepcEPSObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_V) {
  PetscScalar __pyx_v_sval;
  Vec __pyx_v_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommPairs", 0);

  /* "SLEPc/EPS.pyx":1672
 *         see `getKrylovSchurSubcommInfo()`.
 *         """
 *         cdef PetscScalar sval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec vec = NULL
 *         if V is not None: vec = V.vec
 */
  __pyx_v_sval = 0.0;

  /* "SLEPc/EPS.pyx":1673
 *         """
 *         cdef PetscScalar sval = 0
 *         cdef PetscVec vec = NULL             # <<<<<<<<<<<<<<
 *         if V is not None: vec = V.vec
 *         CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) )
 */
  __pyx_v_vec = NULL;

  /* "SLEPc/EPS.pyx":1674
 *         cdef PetscScalar sval = 0
 *         cdef PetscVec vec = NULL
 *         if V is not None: vec = V.vec             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) )
 *         return toScalar(sval)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_V) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_V->vec;
    __pyx_v_vec = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1675
 *         cdef PetscVec vec = NULL
 *         if V is not None: vec = V.vec
 *         CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) )             # <<<<<<<<<<<<<<
 *         return toScalar(sval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommPairs(__pyx_v_self->eps, __pyx_v_i, (&__pyx_v_sval), __pyx_v_vec)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(13, 1675, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1676
 *         if V is not None: vec = V.vec
 *         CHKERR( EPSKrylovSchurGetSubcommPairs(self.eps, i, &sval, vec) )
 *         return toScalar(sval)             # <<<<<<<<<<<<<<
 * 
 *     def getKrylovSchurSubcommMats(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 1676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1649
 *         return (toInt(ival1), toInt(ival2), vec)
 * 
 *     def getKrylovSchurSubcommPairs(self, int i, Vec V):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th eigenpair stored internally in the multi-communicator
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommPairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1678
 *         return toScalar(sval)
 * 
 *     def getKrylovSchurSubcommMats(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the eigenproblem matrices stored internally in the subcommunicator
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats[] = "EPS.getKrylovSchurSubcommMats(self)\n\n        Gets the eigenproblem matrices stored internally in the subcommunicator\n        to which the calling process belongs.\n\n        Returns\n        -------\n        A: Mat\n           The matrix associated with the eigensystem.\n        B: Mat\n           The second matrix in the case of generalized eigenproblems.\n\n        Notes\n        -----\n        This is the analog of `getOperators()`, but returns the matrices distributed\n        differently (in the subcommunicator rather than in the parent communicator).\n\n        These matrices should not be modified by the user.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommMats (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getKrylovSchurSubcommMats", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getKrylovSchurSubcommMats", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  struct PyPetscMatObject *__pyx_v_B = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getKrylovSchurSubcommMats", 0);

  /* "SLEPc/EPS.pyx":1697
 *         These matrices should not be modified by the user.
 *         """
 *         cdef Mat A = Mat()             # <<<<<<<<<<<<<<
 *         cdef Mat B = Mat()
 *         CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) )
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":1698
 *         """
 *         cdef Mat A = Mat()
 *         cdef Mat B = Mat()             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_B = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/EPS.pyx":1699
 *         cdef Mat A = Mat()
 *         cdef Mat B = Mat()
 *         CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetSubcommMats(__pyx_v_self->eps, (&__pyx_v_A->mat), (&__pyx_v_B->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1699, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1700
 *         cdef Mat B = Mat()
 *         CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *         PetscINCREF(B.obj)
 *         return (A, B)
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":1701
 *         CHKERR( EPSKrylovSchurGetSubcommMats(self.eps, &A.mat, &B.mat) )
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)             # <<<<<<<<<<<<<<
 *         return (A, B)
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_B->__pyx_base.obj);

  /* "SLEPc/EPS.pyx":1702
 *         PetscINCREF(A.obj)
 *         PetscINCREF(B.obj)
 *         return (A, B)             # <<<<<<<<<<<<<<
 * 
 *     def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_A));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_A));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_A));
  __Pyx_INCREF(((PyObject *)__pyx_v_B));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_B));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_B));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1678
 *         return toScalar(sval)
 * 
 *     def getKrylovSchurSubcommMats(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the eigenproblem matrices stored internally in the subcommunicator
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF((PyObject *)__pyx_v_B);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1704
 *         return (A, B)
 * 
 *     def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False):             # <<<<<<<<<<<<<<
 *         """
 *         Update the eigenproblem matrices stored internally in the subcommunicator
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats[] = "EPS.updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False)\n\n        Update the eigenproblem matrices stored internally in the subcommunicator\n        to which the calling process belongs.\n\n        Parameters\n        ----------\n        s: float (real or complex)\n           Scalar that multiplies the existing A matrix.\n        a: float (real or complex)\n           Scalar used in the axpy operation on A.\n        Au: Mat, optional\n           The matrix used in the axpy operation on A.\n        t: float (real or complex)\n           Scalar that multiplies the existing B matrix.\n        b: float (real or complex)\n           Scalar used in the axpy operation on B.\n        Bu: Mat, optional\n           The matrix used in the axpy operation on B.\n        structure: `PETSc.Mat.Structure` enumerate\n           Either same, different, or a subset of the non-zero sparsity pattern.\n        globalup: bool\n           Whether global matrices must be updated or not.\n\n        Notes\n        -----\n        This function modifies the eigenproblem matrices at subcommunicator level,\n        and optionally updates the global matrices in the parent communicator.\n        The updates are expressed as ``A <-- s*A + a*Au``,  ``B <-- t*B + b*Bu``.\n\n        It is possible to update one of the matrices, or both.\n\n        The matrices `Au` and `Bu` must be equal in all subcommunicators.\n\n        The `str` flag is passed to the `Mat.axpy()` operations to perform the updates.\n\n        If `globalup` is True, communication is carried out to reconstruct the updated\n        matrices in the parent communicator.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_s = 0;
  PyObject *__pyx_v_a = 0;
  struct PyPetscMatObject *__pyx_v_Au = 0;
  PyObject *__pyx_v_t = 0;
  PyObject *__pyx_v_b = 0;
  struct PyPetscMatObject *__pyx_v_Bu = 0;
  PyObject *__pyx_v_structure = 0;
  PyObject *__pyx_v_globalup = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateKrylovSchurSubcommMats (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_a,&__pyx_n_s_Au,&__pyx_n_s_t,&__pyx_n_s_b,&__pyx_n_s_Bu,&__pyx_n_s_structure,&__pyx_n_s_globalup,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    values[0] = ((PyObject *)__pyx_float_1_0);
    values[1] = ((PyObject *)__pyx_float_1_0);
    values[2] = (PyObject *)((struct PyPetscMatObject *)Py_None);
    values[3] = ((PyObject *)__pyx_float_1_0);
    values[4] = ((PyObject *)__pyx_float_1_0);
    values[5] = (PyObject *)((struct PyPetscMatObject *)Py_None);
    values[6] = ((PyObject *)Py_None);
    values[7] = ((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  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Au);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_t);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Bu);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_globalup);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "updateKrylovSchurSubcommMats") < 0)) __PYX_ERR(13, 1704, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_s = values[0];
    __pyx_v_a = values[1];
    __pyx_v_Au = ((struct PyPetscMatObject *)values[2]);
    __pyx_v_t = values[3];
    __pyx_v_b = values[4];
    __pyx_v_Bu = ((struct PyPetscMatObject *)values[5]);
    __pyx_v_structure = values[6];
    __pyx_v_globalup = values[7];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateKrylovSchurSubcommMats", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1704, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.updateKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Au), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "Au", 0))) __PYX_ERR(13, 1704, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Bu), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "Bu", 0))) __PYX_ERR(13, 1704, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_s, __pyx_v_a, __pyx_v_Au, __pyx_v_t, __pyx_v_b, __pyx_v_Bu, __pyx_v_structure, __pyx_v_globalup);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_s, PyObject *__pyx_v_a, struct PyPetscMatObject *__pyx_v_Au, PyObject *__pyx_v_t, PyObject *__pyx_v_b, struct PyPetscMatObject *__pyx_v_Bu, PyObject *__pyx_v_structure, PyObject *__pyx_v_globalup) {
  Mat __pyx_v_Amat;
  Mat __pyx_v_Bmat;
  MatStructure __pyx_v_vstr;
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Mat __pyx_t_3;
  MatStructure __pyx_t_4;
  PetscBool __pyx_t_5;
  PetscScalar __pyx_t_6;
  PetscScalar __pyx_t_7;
  PetscScalar __pyx_t_8;
  PetscScalar __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("updateKrylovSchurSubcommMats", 0);

  /* "SLEPc/EPS.pyx":1743
 *         matrices in the parent communicator.
 *         """
 *         cdef PetscMat Amat = NULL             # <<<<<<<<<<<<<<
 *         if Au is not None: Amat = Au.mat
 *         cdef PetscMat Bmat = NULL
 */
  __pyx_v_Amat = NULL;

  /* "SLEPc/EPS.pyx":1744
 *         """
 *         cdef PetscMat Amat = NULL
 *         if Au is not None: Amat = Au.mat             # <<<<<<<<<<<<<<
 *         cdef PetscMat Bmat = NULL
 *         if Bu is not None: Bmat = Bu.mat
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Au) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_Au->mat;
    __pyx_v_Amat = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1745
 *         cdef PetscMat Amat = NULL
 *         if Au is not None: Amat = Au.mat
 *         cdef PetscMat Bmat = NULL             # <<<<<<<<<<<<<<
 *         if Bu is not None: Bmat = Bu.mat
 *         cdef PetscMatStructure vstr = matstructure(structure)
 */
  __pyx_v_Bmat = NULL;

  /* "SLEPc/EPS.pyx":1746
 *         if Au is not None: Amat = Au.mat
 *         cdef PetscMat Bmat = NULL
 *         if Bu is not None: Bmat = Bu.mat             # <<<<<<<<<<<<<<
 *         cdef PetscMatStructure vstr = matstructure(structure)
 *         cdef PetscBool tval = globalup
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Bu) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_Bu->mat;
    __pyx_v_Bmat = __pyx_t_3;
  }

  /* "SLEPc/EPS.pyx":1747
 *         cdef PetscMat Bmat = NULL
 *         if Bu is not None: Bmat = Bu.mat
 *         cdef PetscMatStructure vstr = matstructure(structure)             # <<<<<<<<<<<<<<
 *         cdef PetscBool tval = globalup
 *         CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) )
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_4 == ((MatStructure)-1L))) __PYX_ERR(13, 1747, __pyx_L1_error)
  __pyx_v_vstr = __pyx_t_4;

  /* "SLEPc/EPS.pyx":1748
 *         if Bu is not None: Bmat = Bu.mat
 *         cdef PetscMatStructure vstr = matstructure(structure)
 *         cdef PetscBool tval = globalup             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) )
 * 
 */
  __pyx_t_5 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_globalup)); if (unlikely(PyErr_Occurred())) __PYX_ERR(13, 1748, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_5;

  /* "SLEPc/EPS.pyx":1749
 *         cdef PetscMatStructure vstr = matstructure(structure)
 *         cdef PetscBool tval = globalup
 *         CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def setKrylovSchurSubintervals(self, subint):
 */
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_6 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error)
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_a); if (unlikely((__pyx_t_7 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error)
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_8 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error)
  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_b); if (unlikely((__pyx_t_9 == (PetscScalar)-1) && PyErr_Occurred())) __PYX_ERR(13, 1749, __pyx_L1_error)
  __pyx_t_10 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurUpdateSubcommMats(__pyx_v_self->eps, __pyx_t_6, __pyx_t_7, __pyx_v_Amat, __pyx_t_8, __pyx_t_9, __pyx_v_Bmat, __pyx_v_vstr, __pyx_v_tval)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(13, 1749, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1704
 *         return (A, B)
 * 
 *     def updateKrylovSchurSubcommMats(self, s=1.0, a=1.0, Mat Au=None, t=1.0, b=1.0, Mat Bu=None, structure=None, globalup=False):             # <<<<<<<<<<<<<<
 *         """
 *         Update the eigenproblem matrices stored internally in the subcommunicator
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.updateKrylovSchurSubcommMats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1751
 *         CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) )
 * 
 *     def setKrylovSchurSubintervals(self, subint):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the subinterval boundaries for spectrum slicing with a computational interval.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals[] = "EPS.setKrylovSchurSubintervals(self, subint)\n\n        Sets the subinterval boundaries for spectrum slicing with a computational interval.\n        \n        Parameters\n        ----------\n        subint: list of real values specifying subintervals\n\n        Notes\n        -----\n        Logically Collective on EPS\n        This function must be called after setKrylovSchurPartitions(). \n        For npart partitions, the argument subint must contain npart+1 \n        real values sorted in ascending order: \n        subint_0, subint_1, ..., subint_npart, \n        where the first and last values must coincide with the interval \n        endpoints set with EPSSetInterval().\n        The subintervals are then defined by two consecutive points: \n        [subint_0,subint_1], [subint_1,subint_2], and so on.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_subint = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setKrylovSchurSubintervals (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_subint,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_subint)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setKrylovSchurSubintervals") < 0)) __PYX_ERR(13, 1751, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_subint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setKrylovSchurSubintervals", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1751, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurSubintervals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_subint);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_subint) {
  PetscBool __pyx_v_match;
  PetscReal *__pyx_v_subintarray;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PetscInt __pyx_v_nparts;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PetscReal __pyx_t_6;
  __Pyx_RefNannySetupContext("setKrylovSchurSubintervals", 0);

  /* "SLEPc/EPS.pyx":1771
 *         [subint_0,subint_1], [subint_1,subint_2], and so on.
 *         """
 *         cdef PetscBool match = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( PetscObjectTypeCompare(<PetscObject>self.eps, EPSKRYLOVSCHUR, &match) )
 *         if match == PETSC_FALSE: return
 */
  __pyx_v_match = PETSC_FALSE;

  /* "SLEPc/EPS.pyx":1772
 *         """
 *         cdef PetscBool match = PETSC_FALSE
 *         CHKERR( PetscObjectTypeCompare(<PetscObject>self.eps, EPSKRYLOVSCHUR, &match) )             # <<<<<<<<<<<<<<
 *         if match == PETSC_FALSE: return
 *         cdef PetscReal *subintarray = NULL
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PetscObjectTypeCompare(((PetscObject)__pyx_v_self->eps), EPSKRYLOVSCHUR, (&__pyx_v_match))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1772, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1773
 *         cdef PetscBool match = PETSC_FALSE
 *         CHKERR( PetscObjectTypeCompare(<PetscObject>self.eps, EPSKRYLOVSCHUR, &match) )
 *         if match == PETSC_FALSE: return             # <<<<<<<<<<<<<<
 *         cdef PetscReal *subintarray = NULL
 *         cdef Py_ssize_t i = 0, n = len(subint)
 */
  __pyx_t_2 = ((__pyx_v_match == PETSC_FALSE) != 0);
  if (__pyx_t_2) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "SLEPc/EPS.pyx":1774
 *         CHKERR( PetscObjectTypeCompare(<PetscObject>self.eps, EPSKRYLOVSCHUR, &match) )
 *         if match == PETSC_FALSE: return
 *         cdef PetscReal *subintarray = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, n = len(subint)
 *         cdef PetscInt nparts = 0
 */
  __pyx_v_subintarray = NULL;

  /* "SLEPc/EPS.pyx":1775
 *         if match == PETSC_FALSE: return
 *         cdef PetscReal *subintarray = NULL
 *         cdef Py_ssize_t i = 0, n = len(subint)             # <<<<<<<<<<<<<<
 *         cdef PetscInt nparts = 0
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) )
 */
  __pyx_v_i = 0;
  __pyx_t_3 = PyObject_Length(__pyx_v_subint); if (unlikely(__pyx_t_3 == -1)) __PYX_ERR(13, 1775, __pyx_L1_error)
  __pyx_v_n = __pyx_t_3;

  /* "SLEPc/EPS.pyx":1776
 *         cdef PetscReal *subintarray = NULL
 *         cdef Py_ssize_t i = 0, n = len(subint)
 *         cdef PetscInt nparts = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) )
 *         assert n >= nparts
 */
  __pyx_v_nparts = 0;

  /* "SLEPc/EPS.pyx":1777
 *         cdef Py_ssize_t i = 0, n = len(subint)
 *         cdef PetscInt nparts = 0
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) )             # <<<<<<<<<<<<<<
 *         assert n >= nparts
 *         cdef tmp = allocate(n*sizeof(PetscReal),<void**>&subintarray)
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurGetPartitions(__pyx_v_self->eps, (&__pyx_v_nparts))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1777, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1778
 *         cdef PetscInt nparts = 0
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) )
 *         assert n >= nparts             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(n*sizeof(PetscReal),<void**>&subintarray)
 *         for i in range(n): subintarray[i] = asReal(subint[i])
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    if (unlikely(!((__pyx_v_n >= __pyx_v_nparts) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(13, 1778, __pyx_L1_error)
    }
  }
  #endif

  /* "SLEPc/EPS.pyx":1779
 *         CHKERR( EPSKrylovSchurGetPartitions(self.eps, &nparts) )
 *         assert n >= nparts
 *         cdef tmp = allocate(n*sizeof(PetscReal),<void**>&subintarray)             # <<<<<<<<<<<<<<
 *         for i in range(n): subintarray[i] = asReal(subint[i])
 *         CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray))
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_allocate((__pyx_v_n * (sizeof(PetscReal))), ((void **)(&__pyx_v_subintarray))); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_tmp = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "SLEPc/EPS.pyx":1780
 *         assert n >= nparts
 *         cdef tmp = allocate(n*sizeof(PetscReal),<void**>&subintarray)
 *         for i in range(n): subintarray[i] = asReal(subint[i])             # <<<<<<<<<<<<<<
 *         CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray))
 * 
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_3; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_subint, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_t_4); if (unlikely(__pyx_t_6 == -1.0 && PyErr_Occurred())) __PYX_ERR(13, 1780, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_subintarray[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/EPS.pyx":1781
 *         cdef tmp = allocate(n*sizeof(PetscReal),<void**>&subintarray)
 *         for i in range(n): subintarray[i] = asReal(subint[i])
 *         CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray))             # <<<<<<<<<<<<<<
 * 
 *     def setRQCGReset(self, nrest):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSKrylovSchurSetSubintervals(__pyx_v_self->eps, __pyx_v_subintarray)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1781, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1751
 *         CHKERR( EPSKrylovSchurUpdateSubcommMats(self.eps, s, a, Amat, t, b, Bmat, vstr, tval) )
 * 
 *     def setKrylovSchurSubintervals(self, subint):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the subinterval boundaries for spectrum slicing with a computational interval.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setKrylovSchurSubintervals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1783
 *         CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray))
 * 
 *     def setRQCGReset(self, nrest):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the reset parameter of the RQCG iteration. Every nrest iterations,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_164setRQCGReset[] = "EPS.setRQCGReset(self, nrest)\n\n        Sets the reset parameter of the RQCG iteration. Every nrest iterations,\n        the solver performs a Rayleigh-Ritz projection step.\n\n        Parameters\n        ----------\n        nrest: integer\n               The number of iterations between resets.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nrest = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRQCGReset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nrest,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nrest)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRQCGReset") < 0)) __PYX_ERR(13, 1783, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_nrest = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRQCGReset", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 1783, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self), __pyx_v_nrest);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_164setRQCGReset(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_nrest) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setRQCGReset", 0);

  /* "SLEPc/EPS.pyx":1793
 *                The number of iterations between resets.
 *         """
 *         cdef PetscInt val = nrest             # <<<<<<<<<<<<<<
 *         CHKERR( EPSRQCGSetReset(self.eps, val) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_nrest); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(13, 1793, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/EPS.pyx":1794
 *         """
 *         cdef PetscInt val = nrest
 *         CHKERR( EPSRQCGSetReset(self.eps, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getRQCGReset(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSRQCGSetReset(__pyx_v_self->eps, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(13, 1794, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1783
 *         CHKERR(EPSKrylovSchurSetSubintervals(self.eps, subintarray))
 * 
 *     def setRQCGReset(self, nrest):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the reset parameter of the RQCG iteration. Every nrest iterations,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.setRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1796
 *         CHKERR( EPSRQCGSetReset(self.eps, val) )
 * 
 *     def getRQCGReset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reset parameter used in the RQCG method.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3EPS_166getRQCGReset[] = "EPS.getRQCGReset(self)\n\n        Gets the reset parameter used in the RQCG method.\n\n        Returns\n        -------\n        nrest: integer\n               The number of iterations between resets.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRQCGReset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRQCGReset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRQCGReset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_166getRQCGReset(struct PySlepcEPSObject *__pyx_v_self) {
  PetscInt __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getRQCGReset", 0);

  /* "SLEPc/EPS.pyx":1805
 *                The number of iterations between resets.
 *         """
 *         cdef PetscInt val = 0             # <<<<<<<<<<<<<<
 *         CHKERR( EPSRQCGGetReset(self.eps, &val) )
 *         return val
 */
  __pyx_v_val = 0;

  /* "SLEPc/EPS.pyx":1806
 *         """
 *         cdef PetscInt val = 0
 *         CHKERR( EPSRQCGGetReset(self.eps, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(EPSRQCGGetReset(__pyx_v_self->eps, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(13, 1806, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1807
 *         cdef PetscInt val = 0
 *         CHKERR( EPSRQCGGetReset(self.eps, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/EPS.pyx":1796
 *         CHKERR( EPSRQCGSetReset(self.eps, val) )
 * 
 *     def getRQCGReset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reset parameter used in the RQCG method.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.getRQCGReset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1811
 *     #
 *     property problem_type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getProblemType()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1812
 *     property problem_type:
 *         def __get__(self):
 *             return self.getProblemType()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setProblemType(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1812, __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(13, 1812, __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;

  /* "SLEPc/EPS.pyx":1811
 *     #
 *     property problem_type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getProblemType()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.problem_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1813
 *         def __get__(self):
 *             return self.getProblemType()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setProblemType(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_12problem_type_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1814
 *             return self.getProblemType()
 *         def __set__(self, value):
 *             self.setProblemType(value)             # <<<<<<<<<<<<<<
 * 
 *     property extraction:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1814, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1814, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1814, __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;

  /* "SLEPc/EPS.pyx":1813
 *         def __get__(self):
 *             return self.getProblemType()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setProblemType(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.problem_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1817
 * 
 *     property extraction:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getExtraction()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1818
 *     property extraction:
 *         def __get__(self):
 *             return self.getExtraction()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setExtraction(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1818, __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(13, 1818, __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;

  /* "SLEPc/EPS.pyx":1817
 * 
 *     property extraction:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getExtraction()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.extraction.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1819
 *         def __get__(self):
 *             return self.getExtraction()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setExtraction(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_10extraction_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1820
 *             return self.getExtraction()
 *         def __set__(self, value):
 *             self.setExtraction(value)             # <<<<<<<<<<<<<<
 * 
 *     property which:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1820, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1820, __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;

  /* "SLEPc/EPS.pyx":1819
 *         def __get__(self):
 *             return self.getExtraction()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setExtraction(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.extraction.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1823
 * 
 *     property which:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getWhichEigenpairs()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_5which___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1824
 *     property which:
 *         def __get__(self):
 *             return self.getWhichEigenpairs()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setWhichEigenpairs(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWhichEigenpairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1824, __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(13, 1824, __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;

  /* "SLEPc/EPS.pyx":1823
 * 
 *     property which:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getWhichEigenpairs()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1825
 *         def __get__(self):
 *             return self.getWhichEigenpairs()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setWhichEigenpairs(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_5which_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1826
 *             return self.getWhichEigenpairs()
 *         def __set__(self, value):
 *             self.setWhichEigenpairs(value)             # <<<<<<<<<<<<<<
 * 
 *     property target:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setWhichEigenpairs); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1826, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1826, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1826, __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;

  /* "SLEPc/EPS.pyx":1825
 *         def __get__(self):
 *             return self.getWhichEigenpairs()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setWhichEigenpairs(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.which.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1829
 * 
 *     property target:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTarget()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6target___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1830
 *     property target:
 *         def __get__(self):
 *             return self.getTarget()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTarget(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTarget); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1830, __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(13, 1830, __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;

  /* "SLEPc/EPS.pyx":1829
 * 
 *     property target:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTarget()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.target.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1831
 *         def __get__(self):
 *             return self.getTarget()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTarget(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6target_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1832
 *             return self.getTarget()
 *         def __set__(self, value):
 *             self.setTarget(value)             # <<<<<<<<<<<<<<
 * 
 *     property tol:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTarget); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 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;

  /* "SLEPc/EPS.pyx":1831
 *         def __get__(self):
 *             return self.getTarget()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTarget(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.target.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1835
 * 
 *     property tol:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_3tol___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1836
 *     property tol:
 *         def __get__(self):
 *             return self.getTolerances()[0]             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTolerances(tol=value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1836, __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(13, 1836, __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(13, 1836, __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;

  /* "SLEPc/EPS.pyx":1835
 * 
 *     property tol:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.tol.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1837
 *         def __get__(self):
 *             return self.getTolerances()[0]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(tol=value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_3tol_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1838
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 *             self.setTolerances(tol=value)             # <<<<<<<<<<<<<<
 * 
 *     property max_it:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tol, __pyx_v_value) < 0) __PYX_ERR(13, 1838, __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(13, 1838, __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_3); __pyx_t_3 = 0;

  /* "SLEPc/EPS.pyx":1837
 *         def __get__(self):
 *             return self.getTolerances()[0]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(tol=value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.tol.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1841
 * 
 *     property max_it:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1842
 *     property max_it:
 *         def __get__(self):
 *             return self.getTolerances()[1]             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTolerances(max_it=value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1842, __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(13, 1842, __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1842, __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;

  /* "SLEPc/EPS.pyx":1841
 * 
 *     property max_it:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.max_it.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1843
 *         def __get__(self):
 *             return self.getTolerances()[1]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(max_it=value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_6max_it_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1844
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 *             self.setTolerances(max_it=value)             # <<<<<<<<<<<<<<
 * 
 *     property st:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_it, __pyx_v_value) < 0) __PYX_ERR(13, 1844, __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(13, 1844, __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_3); __pyx_t_3 = 0;

  /* "SLEPc/EPS.pyx":1843
 *         def __get__(self):
 *             return self.getTolerances()[1]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(max_it=value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.max_it.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1847
 * 
 *     property st:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getST()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2st___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1848
 *     property st:
 *         def __get__(self):
 *             return self.getST()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setST(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getST); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1848, __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(13, 1848, __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;

  /* "SLEPc/EPS.pyx":1847
 * 
 *     property st:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getST()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.st.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1849
 *         def __get__(self):
 *             return self.getST()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setST(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2st_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1850
 *             return self.getST()
 *         def __set__(self, value):
 *             self.setST(value)             # <<<<<<<<<<<<<<
 * 
 *     property bv:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setST); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1850, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1850, __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;

  /* "SLEPc/EPS.pyx":1849
 *         def __get__(self):
 *             return self.getST()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setST(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.st.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1853
 * 
 *     property bv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getBV()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(((struct PySlepcEPSObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3EPS_2bv___get__(struct PySlepcEPSObject *__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("__get__", 0);

  /* "SLEPc/EPS.pyx":1854
 *     property bv:
 *         def __get__(self):
 *             return self.getBV()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setBV(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(13, 1854, __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(13, 1854, __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;

  /* "SLEPc/EPS.pyx":1853
 * 
 *     property bv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getBV()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.EPS.bv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/EPS.pyx":1855
 *         def __get__(self):
 *             return self.getBV()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setBV(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(((struct PySlepcEPSObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3EPS_2bv_2__set__(struct PySlepcEPSObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/EPS.pyx":1856
 *             return self.getBV()
 *         def __set__(self, value):
 *             self.setBV(value)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 1856, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1856, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 1856, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 1856, __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;

  /* "SLEPc/EPS.pyx":1855
 *         def __get__(self):
 *             return self.getBV()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setBV(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.EPS.bv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":69
 *     ConvergedReason = SVDConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.svd
 *         self.svd = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD___cinit__(struct PySlepcSVDObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/SVD.pyx":70
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.svd             # <<<<<<<<<<<<<<
 *         self.svd = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->svd));

  /* "SLEPc/SVD.pyx":71
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.svd
 *         self.svd = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->svd = NULL;

  /* "SLEPc/SVD.pyx":69
 *     ConvergedReason = SVDConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.svd
 *         self.svd = NULL
 */

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

/* "SLEPc/SVD.pyx":73
 *         self.svd = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the SVD data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_2view[] = "SVD.view(self, Viewer viewer=None)\n\n        Prints the SVD data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional\n                Visualization context; if not provided, the standard\n                output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(14, 73, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 73, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(14, 73, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2view(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2view(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/SVD.pyx":83
 *                 output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( SVDView(self.svd, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/SVD.pyx":84
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( SVDView(self.svd, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":85
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( SVDView(self.svd, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDView(__pyx_v_self->svd, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 85, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":73
 *         self.svd = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the SVD data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":87
 *         CHKERR( SVDView(self.svd, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_4destroy[] = "SVD.destroy(self)\n\n        Destroys the SVD object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_4destroy(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/SVD.pyx":91
 *         Destroys the SVD object.
 *         """
 *         CHKERR( SVDDestroy(&self.svd) )             # <<<<<<<<<<<<<<
 *         self.svd = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDDestroy((&__pyx_v_self->svd))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 91, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":92
 *         """
 *         CHKERR( SVDDestroy(&self.svd) )
 *         self.svd = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->svd = NULL;

  /* "SLEPc/SVD.pyx":93
 *         CHKERR( SVDDestroy(&self.svd) )
 *         self.svd = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":87
 *         CHKERR( SVDView(self.svd, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the SVD object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":95
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_6reset[] = "SVD.reset(self)\n\n        Resets the SVD object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6reset(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/SVD.pyx":99
 *         Resets the SVD object.
 *         """
 *         CHKERR( SVDReset(self.svd) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDReset(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 99, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":95
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the SVD object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":101
 *         CHKERR( SVDReset(self.svd) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_8create[] = "SVD.create(self, comm=None)\n\n        Creates the SVD object.\n\n        Parameters\n        ----------\n        comm: Comm, optional\n              MPI communicator; if not provided, it defaults to all\n              processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(14, 101, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_8create(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_8create(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  SVD __pyx_v_newsvd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/SVD.pyx":111
 *               processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcSVD newsvd = NULL
 *         CHKERR( SVDCreate(ccomm, &newsvd) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 111, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/SVD.pyx":112
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcSVD newsvd = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( SVDCreate(ccomm, &newsvd) )
 *         SlepcCLEAR(self.obj); self.svd = newsvd
 */
  __pyx_v_newsvd = NULL;

  /* "SLEPc/SVD.pyx":113
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcSVD newsvd = NULL
 *         CHKERR( SVDCreate(ccomm, &newsvd) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.svd = newsvd
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCreate(__pyx_v_ccomm, (&__pyx_v_newsvd))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 113, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":114
 *         cdef SlepcSVD newsvd = NULL
 *         CHKERR( SVDCreate(ccomm, &newsvd) )
 *         SlepcCLEAR(self.obj); self.svd = newsvd             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->svd = __pyx_v_newsvd;

  /* "SLEPc/SVD.pyx":115
 *         CHKERR( SVDCreate(ccomm, &newsvd) )
 *         SlepcCLEAR(self.obj); self.svd = newsvd
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, svd_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":101
 *         CHKERR( SVDReset(self.svd) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the SVD object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":117
 *         return self
 * 
 *     def setType(self, svd_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_10setType[] = "SVD.setType(self, svd_type)\n\n        Selects the particular solver to be used in the SVD object.\n\n        Parameters\n        ----------\n        svd_type: `SVD.Type` enumerate\n                  The solver to be used.\n\n        Notes\n        -----\n        See `SVD.Type` for available methods. The default is CROSS.\n        Normally, it is best to use `setFromOptions()` and then set\n        the SVD type from the options database rather than by using\n        this routine.  Using the options database provides the user\n        with maximum flexibility in evaluating the different available\n        methods.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_svd_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_svd_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_svd_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(14, 117, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_svd_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 117, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_svd_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_10setType(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_svd_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_svd_type);

  /* "SLEPc/SVD.pyx":135
 *         methods.
 *         """
 *         cdef SlepcSVDType cval = NULL             # <<<<<<<<<<<<<<
 *         svd_type = str2bytes(svd_type, &cval)
 *         CHKERR( SVDSetType(self.svd, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/SVD.pyx":136
 *         """
 *         cdef SlepcSVDType cval = NULL
 *         svd_type = str2bytes(svd_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetType(self.svd, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_svd_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_svd_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":137
 *         cdef SlepcSVDType cval = NULL
 *         svd_type = str2bytes(svd_type, &cval)
 *         CHKERR( SVDSetType(self.svd, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetType(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 137, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":117
 *         return self
 * 
 *     def setType(self, svd_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the SVD object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_svd_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":139
 *         CHKERR( SVDSetType(self.svd, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the SVD type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_12getType[] = "SVD.getType(self)\n\n        Gets the SVD type of this object.\n\n        Returns\n        -------\n        type: `SVD.Type` enumerate\n              The solver currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_12getType(struct PySlepcSVDObject *__pyx_v_self) {
  const char* __pyx_v_svd_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/SVD.pyx":148
 *               The solver currently being used.
 *         """
 *         cdef SlepcSVDType svd_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetType(self.svd, &svd_type) )
 *         return bytes2str(svd_type)
 */
  __pyx_v_svd_type = NULL;

  /* "SLEPc/SVD.pyx":149
 *         """
 *         cdef SlepcSVDType svd_type = NULL
 *         CHKERR( SVDGetType(self.svd, &svd_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(svd_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetType(__pyx_v_self->svd, (&__pyx_v_svd_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 149, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":150
 *         cdef SlepcSVDType svd_type = NULL
 *         CHKERR( SVDGetType(self.svd, &svd_type) )
 *         return bytes2str(svd_type)             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_svd_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":139
 *         CHKERR( SVDSetType(self.svd, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the SVD type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":152
 *         return bytes2str(svd_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all SVD options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix[] = "SVD.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all SVD options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n                The prefix string set for this SVD object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/SVD.pyx":162
 *                 The prefix string set for this SVD object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/SVD.pyx":163
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetOptionsPrefix(__pyx_v_self->svd, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 163, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":164
 *         cdef const_char *prefix = NULL
 *         CHKERR( SVDGetOptionsPrefix(self.svd, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":152
 *         return bytes2str(svd_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all SVD options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":166
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all SVD options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix[] = "SVD.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all SVD options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all SVD option\n                requests.\n\n        Notes\n        -----\n        A hyphen (-) must NOT be given at the beginning of the prefix\n        name.  The first character of all runtime options is\n        AUTOMATICALLY the hyphen.\n\n        For example, to distinguish between the runtime options for\n        two different SVD contexts, one could call::\n\n            S1.setOptionsPrefix(\"svd1_\")\n            S2.setOptionsPrefix(\"svd2_\")\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(14, 166, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/SVD.pyx":189
 *             S2.setOptionsPrefix("svd2_")
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( SVDSetOptionsPrefix(self.svd, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/SVD.pyx":190
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetOptionsPrefix(self.svd, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":191
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( SVDSetOptionsPrefix(self.svd, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def appendOptionsPrefix(self, prefix):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetOptionsPrefix(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 191, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":166
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all SVD options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":193
 *         CHKERR( SVDSetOptionsPrefix(self.svd, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all SVD options
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix[] = "SVD.appendOptionsPrefix(self, prefix)\n\n        Appends to the prefix used for searching for all SVD options\n        in the database.\n\n        Parameters\n        ----------\n        prefix: string\n                The prefix string to prepend to all SVD option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(14, 193, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 193, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("appendOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/SVD.pyx":203
 *                 The prefix string to prepend to all SVD option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( SVDAppendOptionsPrefix(self.svd, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/SVD.pyx":204
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( SVDAppendOptionsPrefix(self.svd, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":205
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( SVDAppendOptionsPrefix(self.svd, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDAppendOptionsPrefix(__pyx_v_self->svd, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 205, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":193
 *         CHKERR( SVDSetOptionsPrefix(self.svd, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all SVD options
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":207
 *         CHKERR( SVDAppendOptionsPrefix(self.svd, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets SVD options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_20setFromOptions[] = "SVD.setFromOptions(self)\n\n        Sets SVD options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n\n        Notes\n        -----\n        To see all options, run your program with the ``-help``\n        option.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_20setFromOptions(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/SVD.pyx":218
 *         option.
 *         """
 *         CHKERR( SVDSetFromOptions(self.svd) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetFromOptions(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 218, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":207
 *         CHKERR( SVDAppendOptionsPrefix(self.svd, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets SVD options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":222
 *     #
 * 
 *     def getImplicitTranspose(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the mode used to handle the transpose of the matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose[] = "SVD.getImplicitTranspose(self)\n\n        Gets the mode used to handle the transpose of the matrix\n        associated with the singular value problem.\n\n        Returns\n        -------\n        impl: boolean\n              How to handle the transpose (implicitly or not).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getImplicitTranspose (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getImplicitTranspose", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getImplicitTranspose", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getImplicitTranspose", 0);

  /* "SLEPc/SVD.pyx":232
 *               How to handle the transpose (implicitly or not).
 *         """
 *         cdef PetscBool val = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetImplicitTranspose(self.svd, &val) )
 *         return val
 */
  __pyx_v_val = PETSC_FALSE;

  /* "SLEPc/SVD.pyx":233
 *         """
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( SVDGetImplicitTranspose(self.svd, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetImplicitTranspose(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 233, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":234
 *         cdef PetscBool val = PETSC_FALSE
 *         CHKERR( SVDGetImplicitTranspose(self.svd, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setImplicitTranspose(self, mode):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":222
 *     #
 * 
 *     def getImplicitTranspose(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the mode used to handle the transpose of the matrix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":236
 *         return val
 * 
 *     def setImplicitTranspose(self, mode):             # <<<<<<<<<<<<<<
 *         """
 *         Indicates how to handle the transpose of the matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose[] = "SVD.setImplicitTranspose(self, mode)\n\n        Indicates how to handle the transpose of the matrix\n        associated with the singular value problem.\n\n        Parameters\n        ----------\n        impl: boolean\n              How to handle the transpose (implicitly or not).\n\n        Notes\n        -----\n        By default, the transpose of the matrix is explicitly built\n        (if the matrix has defined the MatTranspose operation).\n\n        If this flag is set to true, the solver does not build the\n        transpose, but handles it implicitly via MatMultTranspose().\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setImplicitTranspose (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mode,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setImplicitTranspose") < 0)) __PYX_ERR(14, 236, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_mode = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setImplicitTranspose", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 236, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_mode);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_mode) {
  PetscBool __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setImplicitTranspose", 0);

  /* "SLEPc/SVD.pyx":254
 *         transpose, but handles it implicitly via MatMultTranspose().
 *         """
 *         cdef PetscBool val = mode             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetImplicitTranspose(self.svd, val) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_mode)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 254, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/SVD.pyx":255
 *         """
 *         cdef PetscBool val = mode
 *         CHKERR( SVDSetImplicitTranspose(self.svd, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getWhichSingularTriplets(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetImplicitTranspose(__pyx_v_self->svd, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 255, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":236
 *         return val
 * 
 *     def setImplicitTranspose(self, mode):             # <<<<<<<<<<<<<<
 *         """
 *         Indicates how to handle the transpose of the matrix
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setImplicitTranspose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":257
 *         CHKERR( SVDSetImplicitTranspose(self.svd, val) )
 * 
 *     def getWhichSingularTriplets(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which singular triplets are to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets[] = "SVD.getWhichSingularTriplets(self)\n\n        Returns which singular triplets are to be sought.\n\n        Returns\n        -------\n        which: `SVD.Which` enumerate\n               The singular values to be sought (either largest or\n               smallest).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getWhichSingularTriplets (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getWhichSingularTriplets", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichSingularTriplets", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self) {
  SVDWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getWhichSingularTriplets", 0);

  /* "SLEPc/SVD.pyx":267
 *                smallest).
 *         """
 *         cdef SlepcSVDWhich val = SVD_LARGEST             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) )
 *         return val
 */
  __pyx_v_val = SVD_LARGEST;

  /* "SLEPc/SVD.pyx":268
 *         """
 *         cdef SlepcSVDWhich val = SVD_LARGEST
 *         CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetWhichSingularTriplets(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 268, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":269
 *         cdef SlepcSVDWhich val = SVD_LARGEST
 *         CHKERR( SVDGetWhichSingularTriplets(self.svd, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setWhichSingularTriplets(self, which):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SVDWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":257
 *         CHKERR( SVDSetImplicitTranspose(self.svd, val) )
 * 
 *     def getWhichSingularTriplets(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which singular triplets are to be sought.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":271
 *         return val
 * 
 *     def setWhichSingularTriplets(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which singular triplets are to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets[] = "SVD.setWhichSingularTriplets(self, which)\n\n        Specifies which singular triplets are to be sought.\n\n        Parameters\n        ----------\n        which: `SVD.Which` enumerate\n               The singular values to be sought (either largest or\n               smallest).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_which = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setWhichSingularTriplets (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichSingularTriplets") < 0)) __PYX_ERR(14, 271, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_which = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setWhichSingularTriplets", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 271, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_which);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_which) {
  SVDWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SVDWhich __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setWhichSingularTriplets", 0);

  /* "SLEPc/SVD.pyx":281
 *                smallest).
 *         """
 *         cdef SlepcSVDWhich val = which             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetWhichSingularTriplets(self.svd, val) )
 *     #
 */
  __pyx_t_1 = ((SVDWhich)__Pyx_PyInt_As_SVDWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 281, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/SVD.pyx":282
 *         """
 *         cdef SlepcSVDWhich val = which
 *         CHKERR( SVDSetWhichSingularTriplets(self.svd, val) )             # <<<<<<<<<<<<<<
 *     #
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetWhichSingularTriplets(__pyx_v_self->svd, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 282, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":271
 *         return val
 * 
 *     def setWhichSingularTriplets(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which singular triplets are to be sought.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setWhichSingularTriplets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":285
 *     #
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_30getTolerances[] = "SVD.getTolerances(self)\n\n        Gets the tolerance and maximum iteration count used by the\n        default SVD convergence tests.\n\n        Returns\n        -------\n        tol: float\n             The convergence tolerance.\n        max_it: int\n             The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_30getTolerances(struct PySlepcSVDObject *__pyx_v_self) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  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;
  __Pyx_RefNannySetupContext("getTolerances", 0);

  /* "SLEPc/SVD.pyx":297
 *              The maximum number of iterations
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = 0
 *         CHKERR( SVDGetTolerances(self.svd, &rval, &ival) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/SVD.pyx":298
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetTolerances(self.svd, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))
 */
  __pyx_v_ival = 0;

  /* "SLEPc/SVD.pyx":299
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0
 *         CHKERR( SVDGetTolerances(self.svd, &rval, &ival) )             # <<<<<<<<<<<<<<
 *         return (toReal(rval), toInt(ival))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetTolerances(__pyx_v_self->svd, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 299, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":300
 *         cdef PetscInt  ival = 0
 *         CHKERR( SVDGetTolerances(self.svd, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))             # <<<<<<<<<<<<<<
 * 
 *     def setTolerances(self, tol=None, max_it=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":285
 *     #
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":302
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_32setTolerances[] = "SVD.setTolerances(self, tol=None, max_it=None)\n\n        Sets the tolerance and maximum iteration count used by the\n        default SVD convergence tests.\n\n        Parameters\n        ----------\n        tol: float, optional\n             The convergence tolerance.\n        max_it: int, optional\n             The maximum number of iterations\n\n        Notes\n        -----\n        Use `DECIDE` for `max_it` to assign a reasonably good value,\n        which is dependent on the solution method.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_max_it = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(14, 302, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tol = values[0];
    __pyx_v_max_it = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 302, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_32setTolerances(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscReal __pyx_t_3;
  PetscInt __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("setTolerances", 0);

  /* "SLEPc/SVD.pyx":319
 *         which is dependent on the solution method.
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/SVD.pyx":320
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/SVD.pyx":321
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)             # <<<<<<<<<<<<<<
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( SVDSetTolerances(self.svd, rval, ival) )
 */
  __pyx_t_1 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(14, 321, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":322
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetTolerances(self.svd, rval, ival) )
 * 
 */
  __pyx_t_2 = (__pyx_v_max_it != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(14, 322, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/SVD.pyx":323
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( SVDSetTolerances(self.svd, rval, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetTolerances(__pyx_v_self->svd, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(14, 323, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":302
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":325
 *         CHKERR( SVDSetTolerances(self.svd, rval, ival) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of singular values to compute and the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_34getDimensions[] = "SVD.getDimensions(self)\n\n        Gets the number of singular values to compute and the\n        dimension of the subspace.\n\n        Returns\n        -------\n        nsv: int\n             Number of singular values to compute.\n        ncv: int\n             Maximum dimension of the subspace to be used by the\n             solver.\n        mpd: int\n             Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_34getDimensions(struct PySlepcSVDObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  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;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/SVD.pyx":340
 *              Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/SVD.pyx":341
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) )
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/SVD.pyx":342
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/SVD.pyx":343
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetDimensions(__pyx_v_self->svd, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 343, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":344
 *         cdef PetscInt ival3 = 0
 *         CHKERR( SVDGetDimensions(self.svd, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, nsv=None, ncv=None, mpd=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":325
 *         CHKERR( SVDSetTolerances(self.svd, rval, ival) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of singular values to compute and the
 */

  /* 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_AddTraceback("slepc4py.SLEPc.SVD.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":346
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nsv=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of singular values to compute and the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_36setDimensions[] = "SVD.setDimensions(self, nsv=None, ncv=None, mpd=None)\n\n        Sets the number of singular values to compute and the\n        dimension of the subspace.\n\n        Parameters\n        ----------\n        nsv: int, optional\n             Number of singular values to compute.\n        ncv: int, optional\n             Maximum dimension of the subspace to be used by the\n             solver.\n        mpd: int, optional\n             Maximum dimension allowed for the projected problem.\n\n        Notes\n        -----\n        Use `DECIDE` for `ncv` and `mpd` to assign a reasonably good\n        value, which is dependent on the solution method.\n\n        The parameters `ncv` and `mpd` are intimately related, so that\n        the user is advised to set one of them at most. Normal usage\n        is the following:\n\n         - In cases where `nsv` is small, the user sets `ncv`\n           (a reasonable default is 2 * `nsv`).\n         - In cases where `nsv` is large, the user sets `mpd`.\n\n        The value of `ncv` should always be between `nsv` and (`nsv` +\n        `mpd`), typically `ncv` = `nsv` + `mpd`. If `nsv` is not too\n        large, `mpd` = `nsv` is a reasonable choice, otherwise a\n        smaller value should be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nsv = 0;
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_v_mpd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nsv,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nsv);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(14, 346, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_nsv = values[0];
    __pyx_v_ncv = values[1];
    __pyx_v_mpd = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 346, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_nsv, __pyx_v_ncv, __pyx_v_mpd);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_36setDimensions(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_nsv, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/SVD.pyx":379
 *         smaller value should be used.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/SVD.pyx":380
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nsv is not None: ival1 = asInt(nsv)
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/SVD.pyx":381
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if nsv is not None: ival1 = asInt(nsv)
 *         if ncv is not None: ival2 = asInt(ncv)
 */
  __pyx_v_ival3 = PETSC_DEFAULT;

  /* "SLEPc/SVD.pyx":382
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nsv is not None: ival1 = asInt(nsv)             # <<<<<<<<<<<<<<
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 */
  __pyx_t_1 = (__pyx_v_nsv != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nsv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 382, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":383
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nsv is not None: ival1 = asInt(nsv)
 *         if ncv is not None: ival2 = asInt(ncv)             # <<<<<<<<<<<<<<
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) )
 */
  __pyx_t_2 = (__pyx_v_ncv != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 383, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":384
 *         if nsv is not None: ival1 = asInt(nsv)
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) )
 * 
 */
  __pyx_t_1 = (__pyx_v_mpd != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(14, 384, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":385
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) )             # <<<<<<<<<<<<<<
 * 
 *     def getBV(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetDimensions(__pyx_v_self->svd, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 385, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":346
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nsv=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of singular values to compute and the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":387
 *         CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors objects associated to the SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_38getBV[] = "SVD.getBV(self)\n\n        Obtain the basis vectors objects associated to the SVD object.\n\n        Returns\n        -------\n        V: BV\n            The basis vectors context for right singular vectors.\n        U: BV\n            The basis vectors context for left singular vectors.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBV (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_38getBV(struct PySlepcSVDObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_V = 0;
  struct PySlepcBVObject *__pyx_v_U = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getBV", 0);

  /* "SLEPc/SVD.pyx":398
 *             The basis vectors context for left singular vectors.
 *         """
 *         cdef BV V = BV()             # <<<<<<<<<<<<<<
 *         cdef BV U = BV()
 *         CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) )
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_V = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":399
 *         """
 *         cdef BV V = BV()
 *         cdef BV U = BV()             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) )
 *         PetscINCREF(V.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_U = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":400
 *         cdef BV V = BV()
 *         cdef BV U = BV()
 *         CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(V.obj)
 *         PetscINCREF(U.obj)
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetBV(__pyx_v_self->svd, (&__pyx_v_V->bv), (&__pyx_v_U->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 400, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":401
 *         cdef BV U = BV()
 *         CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) )
 *         PetscINCREF(V.obj)             # <<<<<<<<<<<<<<
 *         PetscINCREF(U.obj)
 *         return (V,U)
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_V->__pyx_base.obj);

  /* "SLEPc/SVD.pyx":402
 *         CHKERR( SVDGetBV(self.svd, &V.bv, &U.bv) )
 *         PetscINCREF(V.obj)
 *         PetscINCREF(U.obj)             # <<<<<<<<<<<<<<
 *         return (V,U)
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_U->__pyx_base.obj);

  /* "SLEPc/SVD.pyx":403
 *         PetscINCREF(V.obj)
 *         PetscINCREF(U.obj)
 *         return (V,U)             # <<<<<<<<<<<<<<
 * 
 *     def setBV(self, BV V not None,BV U=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_V));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_V));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_V));
  __Pyx_INCREF(((PyObject *)__pyx_v_U));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_U));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_U));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":387
 *         CHKERR( SVDSetDimensions(self.svd, ival1, ival2, ival3) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors objects associated to the SVD object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_V);
  __Pyx_XDECREF((PyObject *)__pyx_v_U);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":405
 *         return (V,U)
 * 
 *     def setBV(self, BV V not None,BV U=None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates basis vectors objects to the SVD solver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_40setBV[] = "SVD.setBV(self, BV V, BV U=None)\n\n        Associates basis vectors objects to the SVD solver.\n\n        Parameters\n        ----------\n        V: BV\n            The basis vectors context for right singular vectors.\n        U: BV\n            The basis vectors context for left singular vectors.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_V = 0;
  struct PySlepcBVObject *__pyx_v_U = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_V,&__pyx_n_s_U,0};
    PyObject* values[2] = {0,0};
    values[1] = (PyObject *)((struct PySlepcBVObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(14, 405, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_V = ((struct PySlepcBVObject *)values[0]);
    __pyx_v_U = ((struct PySlepcBVObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBV", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 405, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "V", 0))) __PYX_ERR(14, 405, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8slepc4py_5SLEPc_BV, 1, "U", 0))) __PYX_ERR(14, 405, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_V, __pyx_v_U);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_40setBV(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_V, struct PySlepcBVObject *__pyx_v_U) {
  BV __pyx_v_VBV;
  BV __pyx_v_UBV;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  BV __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setBV", 0);

  /* "SLEPc/SVD.pyx":416
 *             The basis vectors context for left singular vectors.
 *         """
 *         cdef SlepcBV VBV = V.bv             # <<<<<<<<<<<<<<
 *         cdef SlepcBV UBV = NULL
 *         if U is not None: UBV = U.bv
 */
  __pyx_t_1 = __pyx_v_V->bv;
  __pyx_v_VBV = __pyx_t_1;

  /* "SLEPc/SVD.pyx":417
 *         """
 *         cdef SlepcBV VBV = V.bv
 *         cdef SlepcBV UBV = NULL             # <<<<<<<<<<<<<<
 *         if U is not None: UBV = U.bv
 *         CHKERR( SVDSetBV(self.svd, VBV, UBV) )
 */
  __pyx_v_UBV = NULL;

  /* "SLEPc/SVD.pyx":418
 *         cdef SlepcBV VBV = V.bv
 *         cdef SlepcBV UBV = NULL
 *         if U is not None: UBV = U.bv             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetBV(self.svd, VBV, UBV) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_U) != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_1 = __pyx_v_U->bv;
    __pyx_v_UBV = __pyx_t_1;
  }

  /* "SLEPc/SVD.pyx":419
 *         cdef SlepcBV UBV = NULL
 *         if U is not None: UBV = U.bv
 *         CHKERR( SVDSetBV(self.svd, VBV, UBV) )             # <<<<<<<<<<<<<<
 * 
 *     def getOperator(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetBV(__pyx_v_self->svd, __pyx_v_VBV, __pyx_v_UBV)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 419, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":405
 *         return (V,U)
 * 
 *     def setBV(self, BV V not None,BV U=None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates basis vectors objects to the SVD solver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":421
 *         CHKERR( SVDSetBV(self.svd, VBV, UBV) )
 * 
 *     def getOperator(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrix associated with the singular value problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_42getOperator[] = "SVD.getOperator(self)\n\n        Gets the matrix associated with the singular value problem.\n\n        Returns\n        -------\n        A: Mat\n           The matrix associated with the singular value problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOperator (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOperator", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperator", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_42getOperator(struct PySlepcSVDObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getOperator", 0);

  /* "SLEPc/SVD.pyx":430
 *            The matrix associated with the singular value problem.
 *         """
 *         cdef Mat A = Mat()             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetOperator(self.svd, &A.mat) )
 *         PetscINCREF(A.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":431
 *         """
 *         cdef Mat A = Mat()
 *         CHKERR( SVDGetOperator(self.svd, &A.mat) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(A.obj)
 *         return A
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetOperator(__pyx_v_self->svd, (&__pyx_v_A->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 431, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":432
 *         cdef Mat A = Mat()
 *         CHKERR( SVDGetOperator(self.svd, &A.mat) )
 *         PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *         return A
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

  /* "SLEPc/SVD.pyx":433
 *         CHKERR( SVDGetOperator(self.svd, &A.mat) )
 *         PetscINCREF(A.obj)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def setOperator(self, Mat A not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_A));
  __pyx_r = ((PyObject *)__pyx_v_A);
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":421
 *         CHKERR( SVDSetBV(self.svd, VBV, UBV) )
 * 
 *     def getOperator(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrix associated with the singular value problem.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":435
 *         return A
 * 
 *     def setOperator(self, Mat A not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrix associated with the singular value problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_44setOperator[] = "SVD.setOperator(self, Mat A)\n\n        Sets the matrix associated with the singular value problem.\n\n        Parameters\n        ----------\n        A: Mat\n           The matrix associated with the singular value problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOperator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperator") < 0)) __PYX_ERR(14, 435, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_A = ((struct PyPetscMatObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOperator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 435, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(14, 435, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_44setOperator(struct PySlepcSVDObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setOperator", 0);

  /* "SLEPc/SVD.pyx":444
 *            The matrix associated with the singular value problem.
 *         """
 *         CHKERR( SVDSetOperator(self.svd, A.mat) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetOperator(__pyx_v_self->svd, __pyx_v_A->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 444, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":435
 *         return A
 * 
 *     def setOperator(self, Mat A not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrix associated with the singular value problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":448
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the SVD solver starts to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_46setInitialSpace[] = "SVD.setInitialSpace(self, space)\n\n        Sets the initial space from which the SVD solver starts to\n        iterate.\n\n        Parameters\n        ----------\n        space: an sequence of Vec\n           The initial space.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_space = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(14, 448, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_space = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 448, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_space);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_46setInitialSpace(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_space) {
  Vec *__pyx_v_vs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setInitialSpace", 0);
  __Pyx_INCREF(__pyx_v_space);

  /* "SLEPc/SVD.pyx":458
 *            The initial space.
 *         """
 *         if isinstance(space, Vec): space = [space]             # <<<<<<<<<<<<<<
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_space);
    __Pyx_GIVEREF(__pyx_v_space);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space);
    __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/SVD.pyx":459
 *         """
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 */
  __pyx_v_vs = NULL;

  /* "SLEPc/SVD.pyx":460
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 460, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/SVD.pyx":461
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)             # <<<<<<<<<<<<<<
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( SVDSetInitialSpace(self.svd, <PetscInt>ns, vs) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/SVD.pyx":462
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec             # <<<<<<<<<<<<<<
 *         CHKERR( SVDSetInitialSpace(self.svd, <PetscInt>ns, vs) )
 * 
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 462, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(14, 462, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/SVD.pyx":463
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( SVDSetInitialSpace(self.svd, <PetscInt>ns, vs) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetInitialSpace(__pyx_v_self->svd, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(14, 463, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":448
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the SVD solver starts to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_space);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":467
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for an SVD object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_48cancelMonitor[] = "SVD.cancelMonitor(self)\n\n        Clears all monitors for an SVD object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_48cancelMonitor(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("cancelMonitor", 0);

  /* "SLEPc/SVD.pyx":471
 *         Clears all monitors for an SVD object.
 *         """
 *         CHKERR( SVDMonitorCancel(self.svd) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDMonitorCancel(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 471, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":467
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for an SVD object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":475
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_50setUp[] = "SVD.setUp(self)\n\n        Sets up all the internal data structures necessary for the\n        execution of the singular value solver.\n\n        Notes\n        -----\n        This function need not be called explicitly in most cases,\n        since `solve()` calls it. It can be useful when one wants to\n        measure the set-up time separately from the solve time.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_50setUp(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/SVD.pyx":486
 *         measure the set-up time separately from the solve time.
 *         """
 *         CHKERR( SVDSetUp(self.svd) )             # <<<<<<<<<<<<<<
 * 
 *     def solve(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSetUp(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 486, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":475
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":488
 *         CHKERR( SVDSetUp(self.svd) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the singular value problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_52solve[] = "SVD.solve(self)\n\n        Solves the singular value problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_52solve(struct PySlepcSVDObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "SLEPc/SVD.pyx":492
 *         Solves the singular value problem.
 *         """
 *         CHKERR( SVDSolve(self.svd) )             # <<<<<<<<<<<<<<
 * 
 *     def getIterationNumber(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDSolve(__pyx_v_self->svd)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 492, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":488
 *         CHKERR( SVDSetUp(self.svd) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the singular value problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":494
 *         CHKERR( SVDSolve(self.svd) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_54getIterationNumber[] = "SVD.getIterationNumber(self)\n\n        Gets the current iteration number. If the call to `solve()` is\n        complete, then it returns the number of iterations carried out\n        by the solution method.\n\n        Returns\n        -------\n        its: int\n             Iteration number.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_54getIterationNumber(struct PySlepcSVDObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getIterationNumber", 0);

  /* "SLEPc/SVD.pyx":505
 *              Iteration number.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetIterationNumber(self.svd, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/SVD.pyx":506
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( SVDGetIterationNumber(self.svd, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetIterationNumber(__pyx_v_self->svd, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 506, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":507
 *         cdef PetscInt ival = 0
 *         CHKERR( SVDGetIterationNumber(self.svd, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getConvergedReason(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":494
 *         CHKERR( SVDSolve(self.svd) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":509
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_56getConvergedReason[] = "SVD.getConvergedReason(self)\n\n        Gets the reason why the `solve()` iteration was stopped.\n\n        Returns\n        -------\n        reason: `SVD.ConvergedReason` enumerate\n                Negative value indicates diverged, positive value\n                converged.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_56getConvergedReason(struct PySlepcSVDObject *__pyx_v_self) {
  SVDConvergedReason __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergedReason", 0);

  /* "SLEPc/SVD.pyx":519
 *                 converged.
 *         """
 *         cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetConvergedReason(self.svd, &val) )
 *         return val
 */
  __pyx_v_val = SVD_CONVERGED_ITERATING;

  /* "SLEPc/SVD.pyx":520
 *         """
 *         cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING
 *         CHKERR( SVDGetConvergedReason(self.svd, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetConvergedReason(__pyx_v_self->svd, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 520, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":521
 *         cdef SlepcSVDConvergedReason val = SVD_CONVERGED_ITERATING
 *         CHKERR( SVDGetConvergedReason(self.svd, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def getConverged(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_SVDConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":509
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":523
 *         return val
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged singular triplets.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_58getConverged[] = "SVD.getConverged(self)\n\n        Gets the number of converged singular triplets.\n\n        Returns\n        -------\n        nconv: int\n               Number of converged singular triplets.\n\n        Notes\n        -----\n        This function should be called after `solve()` has finished.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConverged (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_58getConverged(struct PySlepcSVDObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConverged", 0);

  /* "SLEPc/SVD.pyx":536
 *         This function should be called after `solve()` has finished.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetConverged(self.svd, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/SVD.pyx":537
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( SVDGetConverged(self.svd, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetConverged(__pyx_v_self->svd, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 537, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":538
 *         cdef PetscInt ival = 0
 *         CHKERR( SVDGetConverged(self.svd, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getValue(self, int i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":523
 *         return val
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged singular triplets.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":540
 *         return toInt(ival)
 * 
 *     def getValue(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th singular value as computed by `solve()`.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_60getValue[] = "SVD.getValue(self, int i)\n\n        Gets the i-th singular value as computed by `solve()`.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n\n        Returns\n        -------\n        s: float\n           The computed singular value.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`. Singular triplets are\n        indexed according to the ordering criterion established with\n        `setWhichSingularTriplets()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getValue (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getValue") < 0)) __PYX_ERR(14, 540, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 540, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getValue", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 540, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_60getValue(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i) {
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getValue", 0);

  /* "SLEPc/SVD.pyx":561
 *         `setWhichSingularTriplets()`.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) )
 *         return toReal(rval)
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/SVD.pyx":562
 *         """
 *         cdef PetscReal rval = 0
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_rval), NULL, NULL)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 562, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":563
 *         cdef PetscReal rval = 0
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, NULL, NULL) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def getVectors(self, int i, Vec U not None, Vec V not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":540
 *         return toInt(ival)
 * 
 *     def getValue(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th singular value as computed by `solve()`.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":565
 *         return toReal(rval)
 * 
 *     def getVectors(self, int i, Vec U not None, Vec V not None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th left and right singular vectors as computed by
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_62getVectors[] = "SVD.getVectors(self, int i, Vec U, Vec V)\n\n        Gets the i-th left and right singular vectors as computed by\n        `solve()`.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n        U: Vec\n           Placeholder for the returned left singular vector.\n        V: Vec\n           Placeholder for the returned right singular vector.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`. Singular triplets are\n        indexed according to the ordering criterion established with\n        `setWhichSingularTriplets()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_U = 0;
  struct PyPetscVecObject *__pyx_v_V = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getVectors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_U,&__pyx_n_s_V,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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 1); __PYX_ERR(14, 565, __pyx_L3_error)
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, 2); __PYX_ERR(14, 565, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getVectors") < 0)) __PYX_ERR(14, 565, __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 565, __pyx_L3_error)
    __pyx_v_U = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_V = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getVectors", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 565, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getVectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "U", 0))) __PYX_ERR(14, 565, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "V", 0))) __PYX_ERR(14, 565, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_U, __pyx_v_V);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_62getVectors(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V) {
  PetscReal __pyx_v_dummy;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("getVectors", 0);

  /* "SLEPc/SVD.pyx":586
 *         `setWhichSingularTriplets()`.
 *         """
 *         cdef PetscReal dummy = 0             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) )
 * 
 */
  __pyx_v_dummy = 0.0;

  /* "SLEPc/SVD.pyx":587
 *         """
 *         cdef PetscReal dummy = 0
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def getSingularTriplet(self, int i, Vec U=None, Vec V=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_dummy), __pyx_v_U->vec, __pyx_v_V->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 587, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":565
 *         return toReal(rval)
 * 
 *     def getVectors(self, int i, Vec U not None, Vec V not None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th left and right singular vectors as computed by
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getVectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":589
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) )
 * 
 *     def getSingularTriplet(self, int i, Vec U=None, Vec V=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th triplet of the singular value decomposition as
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_64getSingularTriplet[] = "SVD.getSingularTriplet(self, int i, Vec U=None, Vec V=None)\n\n        Gets the i-th triplet of the singular value decomposition as\n        computed by `solve()`. The solution consists of the singular\n        value and its left and right singular vectors.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be obtained.\n        U: Vec\n           Placeholder for the returned left singular vector.\n        V: Vec\n           Placeholder for the returned right singular vector.\n\n        Returns\n        -------\n        s: float\n           The computed singular value.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`. Singular triplets are\n        indexed according to the ordering criterion established with\n        `setWhichSingularTriplets()`.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_U = 0;
  struct PyPetscVecObject *__pyx_v_V = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSingularTriplet (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_U,&__pyx_n_s_V,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[2] = (PyObject *)((struct PyPetscVecObject *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_U);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_V);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getSingularTriplet") < 0)) __PYX_ERR(14, 589, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 589, __pyx_L3_error)
    __pyx_v_U = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_V = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getSingularTriplet", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 589, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getSingularTriplet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_U), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "U", 0))) __PYX_ERR(14, 589, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_V), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "V", 0))) __PYX_ERR(14, 589, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_U, __pyx_v_V);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_64getSingularTriplet(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_U, struct PyPetscVecObject *__pyx_v_V) {
  PetscReal __pyx_v_rval;
  Vec __pyx_v_Uvec;
  Vec __pyx_v_Vvec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("getSingularTriplet", 0);

  /* "SLEPc/SVD.pyx":616
 *         `setWhichSingularTriplets()`.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec Uvec = NULL
 *         cdef PetscVec Vvec = NULL
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/SVD.pyx":617
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscVec Uvec = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec Vvec = NULL
 *         if U is not None: Uvec = U.vec
 */
  __pyx_v_Uvec = NULL;

  /* "SLEPc/SVD.pyx":618
 *         cdef PetscReal rval = 0
 *         cdef PetscVec Uvec = NULL
 *         cdef PetscVec Vvec = NULL             # <<<<<<<<<<<<<<
 *         if U is not None: Uvec = U.vec
 *         if V is not None: Vvec = V.vec
 */
  __pyx_v_Vvec = NULL;

  /* "SLEPc/SVD.pyx":619
 *         cdef PetscVec Uvec = NULL
 *         cdef PetscVec Vvec = NULL
 *         if U is not None: Uvec = U.vec             # <<<<<<<<<<<<<<
 *         if V is not None: Vvec = V.vec
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_U) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_U->vec;
    __pyx_v_Uvec = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":620
 *         cdef PetscVec Vvec = NULL
 *         if U is not None: Uvec = U.vec
 *         if V is not None: Vvec = V.vec             # <<<<<<<<<<<<<<
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) )
 *         return toReal(rval)
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_V) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_V->vec;
    __pyx_v_Vvec = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":621
 *         if U is not None: Uvec = U.vec
 *         if V is not None: Vvec = V.vec
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDGetSingularTriplet(__pyx_v_self->svd, __pyx_v_i, (&__pyx_v_rval), __pyx_v_Uvec, __pyx_v_Vvec)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 621, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":622
 *         if V is not None: Vvec = V.vec
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &rval, Uvec, Vvec) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":589
 *         CHKERR( SVDGetSingularTriplet(self.svd, i, &dummy, U.vec, V.vec) )
 * 
 *     def getSingularTriplet(self, int i, Vec U=None, Vec V=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th triplet of the singular value decomposition as
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getSingularTriplet", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":626
 *     #
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_66computeError[] = "SVD.computeError(self, int i, etype=None)\n\n        Computes the error (based on the residual norm) associated with the i-th\n        singular triplet.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be considered.\n        etype: `SVD.ErrorType` enumerate\n           The error type to compute.\n\n        Returns\n        -------\n        e: real\n           The relative error bound, computed in various ways from the residual norm\n           ``sqrt(n1^2+n2^2)`` where ``n1 = ||A*v-sigma*u||_2``,\n           ``n2 = ||A^T*u-sigma*v||_2``, ``sigma`` is the singular\n           value, ``u`` and ``v`` are the left and right singular\n           vectors.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_v_etype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeError (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(14, 626, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 626, __pyx_L3_error)
    __pyx_v_etype = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 626, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_66computeError(struct PySlepcSVDObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) {
  SVDErrorType __pyx_v_et;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  SVDErrorType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("computeError", 0);

  /* "SLEPc/SVD.pyx":652
 *         ``nconv-1`` (see `getConverged()`).
 *         """
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 */
  __pyx_v_et = SVD_ERROR_RELATIVE;

  /* "SLEPc/SVD.pyx":653
 *         """
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         CHKERR( SVDComputeError(self.svd, i, et, &rval) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/SVD.pyx":654
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         CHKERR( SVDComputeError(self.svd, i, et, &rval) )
 *         return toReal(rval)
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((SVDErrorType)__Pyx_PyInt_As_SVDErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 654, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":655
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 *         CHKERR( SVDComputeError(self.svd, i, et, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDComputeError(__pyx_v_self->svd, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(14, 655, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":656
 *         if etype is not None: et = etype
 *         CHKERR( SVDComputeError(self.svd, i, et, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":626
 *     #
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":658
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_68errorView[] = "SVD.errorView(self, etype=None, Viewer viewer=None)\n\n        Displays the errors associated with the computed solution\n        (as well as the eigenvalues).\n\n        Parameters\n        ----------\n        etype: `SVD.ErrorType` enumerate, optional\n           The error type to compute.\n        viewer: Viewer, optional.\n                Visualization context; if not provided, the standard\n                output is used.\n\n        Notes\n        -----\n        By default, this function checks the error of all eigenpairs and prints\n        the eigenvalues if all of them are below the requested tolerance.\n        If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n        eigenvalues and corresponding errors is printed.\n\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_etype = 0;
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("errorView (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = (PyObject *)((struct PyPetscViewerObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(14, 658, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_etype = values[0];
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 658, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(14, 658, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_68errorView(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) {
  SVDErrorType __pyx_v_et;
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  SVDErrorType __pyx_t_3;
  PetscViewer __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("errorView", 0);

  /* "SLEPc/SVD.pyx":679
 * 
 *         """
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 */
  __pyx_v_et = SVD_ERROR_RELATIVE;

  /* "SLEPc/SVD.pyx":680
 *         """
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((SVDErrorType)__Pyx_PyInt_As_SVDErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(14, 680, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/SVD.pyx":681
 *         cdef SlepcSVDErrorType et = SVD_ERROR_RELATIVE
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( SVDErrorView(self.svd, et, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/SVD.pyx":682
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( SVDErrorView(self.svd, et, vwr) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_4;
  }

  /* "SLEPc/SVD.pyx":683
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( SVDErrorView(self.svd, et, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDErrorView(__pyx_v_self->svd, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(14, 683, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":658
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":687
 *     #
 * 
 *     def setCrossEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (`EPS`) to the singular value
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_70setCrossEPS[] = "SVD.setCrossEPS(self, EPS eps)\n\n        Associate an eigensolver object (`EPS`) to the singular value\n        solver.\n\n        Parameters\n        ----------\n        eps: EPS\n             The eigensolver object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCrossEPS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCrossEPS") < 0)) __PYX_ERR(14, 687, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCrossEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 687, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(14, 687, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_eps);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_70setCrossEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setCrossEPS", 0);

  /* "SLEPc/SVD.pyx":697
 *              The eigensolver object.
 *         """
 *         CHKERR( SVDCrossSetEPS(self.svd, eps.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def getCrossEPS(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCrossSetEPS(__pyx_v_self->svd, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 697, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":687
 *     #
 * 
 *     def setCrossEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (`EPS`) to the singular value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":699
 *         CHKERR( SVDCrossSetEPS(self.svd, eps.eps) )
 * 
 *     def getCrossEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (`EPS`) associated to the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_72getCrossEPS[] = "SVD.getCrossEPS(self)\n\n        Retrieve the eigensolver object (`EPS`) associated to the\n        singular value solver.\n\n        Returns\n        -------\n        eps: EPS\n             The eigensolver object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCrossEPS (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getCrossEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCrossEPS", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_72getCrossEPS(struct PySlepcSVDObject *__pyx_v_self) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getCrossEPS", 0);

  /* "SLEPc/SVD.pyx":709
 *              The eigensolver object.
 *         """
 *         cdef EPS eps = EPS()             # <<<<<<<<<<<<<<
 *         CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":710
 *         """
 *         cdef EPS eps = EPS()
 *         CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(eps.obj)
 *         return eps
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCrossGetEPS(__pyx_v_self->svd, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 710, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":711
 *         cdef EPS eps = EPS()
 *         CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)             # <<<<<<<<<<<<<<
 *         return eps
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj);

  /* "SLEPc/SVD.pyx":712
 *         CHKERR( SVDCrossGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)
 *         return eps             # <<<<<<<<<<<<<<
 * 
 *     def setCyclicEPS(self, EPS eps not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_eps));
  __pyx_r = ((PyObject *)__pyx_v_eps);
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":699
 *         CHKERR( SVDCrossSetEPS(self.svd, eps.eps) )
 * 
 *     def getCrossEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (`EPS`) associated to the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCrossEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_eps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":714
 *         return eps
 * 
 *     def setCyclicEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (`EPS`) to the singular value
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_74setCyclicEPS[] = "SVD.setCyclicEPS(self, EPS eps)\n\n        Associate an eigensolver object (`EPS`) to the singular value\n        solver.\n\n        Parameters\n        ----------\n        eps: EPS\n             The eigensolver object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCyclicEPS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCyclicEPS") < 0)) __PYX_ERR(14, 714, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCyclicEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 714, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(14, 714, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_eps);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_74setCyclicEPS(struct PySlepcSVDObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setCyclicEPS", 0);

  /* "SLEPc/SVD.pyx":724
 *              The eigensolver object.
 *         """
 *         CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def getCyclicEPS(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicSetEPS(__pyx_v_self->svd, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 724, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":714
 *         return eps
 * 
 *     def setCyclicEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (`EPS`) to the singular value
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":726
 *         CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) )
 * 
 *     def getCyclicEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (`EPS`) associated to the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_76getCyclicEPS[] = "SVD.getCyclicEPS(self)\n\n        Retrieve the eigensolver object (`EPS`) associated to the\n        singular value solver.\n\n        Returns\n        -------\n        eps: EPS\n             The eigensolver object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCyclicEPS (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getCyclicEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCyclicEPS", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_76getCyclicEPS(struct PySlepcSVDObject *__pyx_v_self) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getCyclicEPS", 0);

  /* "SLEPc/SVD.pyx":736
 *              The eigensolver object.
 *         """
 *         cdef EPS eps = EPS()             # <<<<<<<<<<<<<<
 *         CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/SVD.pyx":737
 *         """
 *         cdef EPS eps = EPS()
 *         CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(eps.obj)
 *         return eps
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicGetEPS(__pyx_v_self->svd, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 737, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":738
 *         cdef EPS eps = EPS()
 *         CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)             # <<<<<<<<<<<<<<
 *         return eps
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj);

  /* "SLEPc/SVD.pyx":739
 *         CHKERR( SVDCyclicGetEPS(self.svd, &eps.eps) )
 *         PetscINCREF(eps.obj)
 *         return eps             # <<<<<<<<<<<<<<
 * 
 *     def setCyclicExplicitMatrix(self, flag=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_eps));
  __pyx_r = ((PyObject *)__pyx_v_eps);
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":726
 *         CHKERR( SVDCyclicSetEPS(self.svd, eps.eps) )
 * 
 *     def getCyclicEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (`EPS`) associated to the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCyclicEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_eps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":741
 *         return eps
 * 
 *     def setCyclicExplicitMatrix(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix[] = "SVD.setCyclicExplicitMatrix(self, flag=True)\n\n        Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0\n        ]`` must be computed explicitly.\n\n        Parameters\n        ----------\n        flag: boolean\n              True if ``H(A)`` is built explicitly.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setCyclicExplicitMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCyclicExplicitMatrix") < 0)) __PYX_ERR(14, 741, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_flag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setCyclicExplicitMatrix", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 741, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setCyclicExplicitMatrix", 0);

  /* "SLEPc/SVD.pyx":751
 *               True if ``H(A)`` is built explicitly.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) )
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/SVD.pyx":752
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 752, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_tval = PETSC_TRUE;
  }

  /* "SLEPc/SVD.pyx":753
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def getCyclicExplicitMatrix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicSetExplicitMatrix(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 753, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":741
 *         return eps
 * 
 *     def setCyclicExplicitMatrix(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the eigensolver operator ``H(A) = [ 0 A ; A^T 0
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":755
 *         CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) )
 * 
 *     def getCyclicExplicitMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix[] = "SVD.getCyclicExplicitMatrix(self)\n\n        Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is\n        built explicitly.\n\n        Returns\n        -------\n        flag: boolean\n              True if ``H(A)`` is built explicitly.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getCyclicExplicitMatrix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getCyclicExplicitMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getCyclicExplicitMatrix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix(struct PySlepcSVDObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getCyclicExplicitMatrix", 0);

  /* "SLEPc/SVD.pyx":765
 *               True if ``H(A)`` is built explicitly.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) )
 *         return <bint>tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/SVD.pyx":766
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint>tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDCyclicGetExplicitMatrix(__pyx_v_self->svd, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(14, 766, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":767
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( SVDCyclicGetExplicitMatrix(self.svd, &tval) )
 *         return <bint>tval             # <<<<<<<<<<<<<<
 * 
 *     def setLanczosOneSide(self, flag=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/SVD.pyx":755
 *         CHKERR( SVDCyclicSetExplicitMatrix(self.svd, tval) )
 * 
 *     def getCyclicExplicitMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating if ``H(A) = [ 0 A ; A^T 0 ]`` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.getCyclicExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":769
 *         return <bint>tval
 * 
 *     def setLanczosOneSide(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the variant of the Lanczos method to be used is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide[] = "SVD.setLanczosOneSide(self, flag=True)\n\n        Indicate if the variant of the Lanczos method to be used is\n        one-sided or two-sided.\n\n        Parameters\n        ----------\n        flag: boolean\n              True if the method is one-sided.\n\n        Notes\n        -----\n        By default, a two-sided variant is selected, which is\n        sometimes slightly more robust. However, the one-sided variant\n        is faster because it avoids the orthogonalization associated\n        to left singular vectors. It also saves the memory required\n        for storing such vectors.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLanczosOneSide (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLanczosOneSide") < 0)) __PYX_ERR(14, 769, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_flag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLanczosOneSide", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 769, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setLanczosOneSide", 0);

  /* "SLEPc/SVD.pyx":787
 *         for storing such vectors.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/SVD.pyx":788
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 788, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_tval = PETSC_TRUE;
  }

  /* "SLEPc/SVD.pyx":789
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def setTRLanczosOneSide(self, flag=True):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDLanczosSetOneSide(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 789, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":769
 *         return <bint>tval
 * 
 *     def setLanczosOneSide(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the variant of the Lanczos method to be used is
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":791
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 * 
 *     def setTRLanczosOneSide(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the variant of the thick-restart Lanczos method to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide[] = "SVD.setTRLanczosOneSide(self, flag=True)\n\n        Indicate if the variant of the thick-restart Lanczos method to\n        be used is one-sided or two-sided.\n\n        Parameters\n        ----------\n        flag: boolean\n              True if the method is one-sided.\n\n        Notes\n        -----\n        By default, a two-sided variant is selected, which is\n        sometimes slightly more robust. However, the one-sided variant\n        is faster because it avoids the orthogonalization associated\n        to left singular vectors.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTRLanczosOneSide (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTRLanczosOneSide") < 0)) __PYX_ERR(14, 791, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_flag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTRLanczosOneSide", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(14, 791, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTRLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(((struct PySlepcSVDObject *)__pyx_v_self), __pyx_v_flag);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTRLanczosOneSide", 0);

  /* "SLEPc/SVD.pyx":808
 *         to left singular vectors.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/SVD.pyx":809
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE             # <<<<<<<<<<<<<<
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 809, __pyx_L1_error)
  if (__pyx_t_1) {
    __pyx_v_tval = PETSC_TRUE;
  }

  /* "SLEPc/SVD.pyx":810
 *         cdef PetscBool tval = PETSC_FALSE
 *         if flag: tval = PETSC_TRUE
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SVDLanczosSetOneSide(__pyx_v_self->svd, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(14, 810, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":791
 *         CHKERR( SVDLanczosSetOneSide(self.svd, tval) )
 * 
 *     def setTRLanczosOneSide(self, flag=True):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the variant of the thick-restart Lanczos method to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.setTRLanczosOneSide", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":815
 * 
 *     property transpose_mode:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTransposeMode()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode___get__(struct PySlepcSVDObject *__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("__get__", 0);

  /* "SLEPc/SVD.pyx":816
 *     property transpose_mode:
 *         def __get__(self):
 *             return self.getTransposeMode()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTransposeMode(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTransposeMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(14, 816, __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(14, 816, __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;

  /* "SLEPc/SVD.pyx":815
 * 
 *     property transpose_mode:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTransposeMode()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.transpose_mode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":817
 *         def __get__(self):
 *             return self.getTransposeMode()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTransposeMode(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD_14transpose_mode_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/SVD.pyx":818
 *             return self.getTransposeMode()
 *         def __set__(self, value):
 *             self.setTransposeMode(value)             # <<<<<<<<<<<<<<
 * 
 *     property which:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTransposeMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 818, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 818, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 818, __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;

  /* "SLEPc/SVD.pyx":817
 *         def __get__(self):
 *             return self.getTransposeMode()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTransposeMode(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.SVD.transpose_mode.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":821
 * 
 *     property which:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getWhichSingularTriplets()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_5which___get__(struct PySlepcSVDObject *__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("__get__", 0);

  /* "SLEPc/SVD.pyx":822
 *     property which:
 *         def __get__(self):
 *             return self.getWhichSingularTriplets()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setWhichSingularTriplets(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getWhichSingularTriplets); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 822, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(14, 822, __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(14, 822, __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;

  /* "SLEPc/SVD.pyx":821
 * 
 *     property which:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getWhichSingularTriplets()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.which.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":823
 *         def __get__(self):
 *             return self.getWhichSingularTriplets()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setWhichSingularTriplets(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD_5which_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/SVD.pyx":824
 *             return self.getWhichSingularTriplets()
 *         def __set__(self, value):
 *             self.setWhichSingularTriplets(value)             # <<<<<<<<<<<<<<
 * 
 *     property tol:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setWhichSingularTriplets); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 824, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 824, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 824, __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;

  /* "SLEPc/SVD.pyx":823
 *         def __get__(self):
 *             return self.getWhichSingularTriplets()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setWhichSingularTriplets(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.SVD.which.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":827
 * 
 *     property tol:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_3tol___get__(struct PySlepcSVDObject *__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("__get__", 0);

  /* "SLEPc/SVD.pyx":828
 *     property tol:
 *         def __get__(self):
 *             return self.getTolerances()[0]             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTolerances(tol=value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(14, 828, __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(14, 828, __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(14, 828, __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;

  /* "SLEPc/SVD.pyx":827
 * 
 *     property tol:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.tol.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":829
 *         def __get__(self):
 *             return self.getTolerances()[0]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(tol=value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD_3tol_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/SVD.pyx":830
 *             return self.getTolerances()[0]
 *         def __set__(self, value):
 *             self.setTolerances(tol=value)             # <<<<<<<<<<<<<<
 * 
 *     property max_it:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_tol, __pyx_v_value) < 0) __PYX_ERR(14, 830, __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(14, 830, __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_3); __pyx_t_3 = 0;

  /* "SLEPc/SVD.pyx":829
 *         def __get__(self):
 *             return self.getTolerances()[0]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(tol=value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.tol.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":833
 * 
 *     property max_it:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it___get__(struct PySlepcSVDObject *__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("__get__", 0);

  /* "SLEPc/SVD.pyx":834
 *     property max_it:
 *         def __get__(self):
 *             return self.getTolerances()[1]             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setTolerances(max_it=value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTolerances); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(14, 834, __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(14, 834, __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 834, __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;

  /* "SLEPc/SVD.pyx":833
 * 
 *     property max_it:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.max_it.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":835
 *         def __get__(self):
 *             return self.getTolerances()[1]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(max_it=value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD_6max_it_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/SVD.pyx":836
 *             return self.getTolerances()[1]
 *         def __set__(self, value):
 *             self.setTolerances(max_it=value)             # <<<<<<<<<<<<<<
 * 
 *     property bv:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setTolerances); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_it, __pyx_v_value) < 0) __PYX_ERR(14, 836, __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(14, 836, __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_3); __pyx_t_3 = 0;

  /* "SLEPc/SVD.pyx":835
 *         def __get__(self):
 *             return self.getTolerances()[1]
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setTolerances(max_it=value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.max_it.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":839
 * 
 *     property bv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getBV()
 *         def __set__(self, value):
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(((struct PySlepcSVDObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3SVD_2bv___get__(struct PySlepcSVDObject *__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("__get__", 0);

  /* "SLEPc/SVD.pyx":840
 *     property bv:
 *         def __get__(self):
 *             return self.getBV()             # <<<<<<<<<<<<<<
 *         def __set__(self, value):
 *             self.setBV(value)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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(14, 840, __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(14, 840, __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;

  /* "SLEPc/SVD.pyx":839
 * 
 *     property bv:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.getBV()
 *         def __set__(self, value):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.SVD.bv.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SVD.pyx":841
 *         def __get__(self):
 *             return self.getBV()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setBV(value)
 * 
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(((struct PySlepcSVDObject *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_8slepc4py_5SLEPc_3SVD_2bv_2__set__(struct PySlepcSVDObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "SLEPc/SVD.pyx":842
 *             return self.getBV()
 *         def __set__(self, value):
 *             self.setBV(value)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBV); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && 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_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 842, __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_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_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 842, __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;

  /* "SLEPc/SVD.pyx":841
 *         def __get__(self):
 *             return self.getBV()
 *         def __set__(self, value):             # <<<<<<<<<<<<<<
 *             self.setBV(value)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  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("slepc4py.SLEPc.SVD.bv.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":185
 *     ConvergedReason = PEPConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.pep
 *         self.pep = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(((struct PySlepcPEPObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_3PEP___cinit__(struct PySlepcPEPObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/PEP.pyx":186
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.pep             # <<<<<<<<<<<<<<
 *         self.pep = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->pep));

  /* "SLEPc/PEP.pyx":187
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.pep
 *         self.pep = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->pep = NULL;

  /* "SLEPc/PEP.pyx":185
 *     ConvergedReason = PEPConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.pep
 *         self.pep = NULL
 */

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

/* "SLEPc/PEP.pyx":189
 *         self.pep = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the PEP data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_2view[] = "PEP.view(self, Viewer viewer=None)\n\n        Prints the PEP data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional.\n            Visualization context; if not provided, the standard\n            output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(15, 189, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 189, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(15, 189, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_2view(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_2view(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/PEP.pyx":199
 *             output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( PEPView(self.pep, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/PEP.pyx":200
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( PEPView(self.pep, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":201
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( PEPView(self.pep, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPView(__pyx_v_self->pep, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 201, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":189
 *         self.pep = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the PEP data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":203
 *         CHKERR( PEPView(self.pep, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_4destroy[] = "PEP.destroy(self)\n\n        Destroys the PEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_4destroy(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/PEP.pyx":207
 *         Destroys the PEP object.
 *         """
 *         CHKERR( PEPDestroy(&self.pep) )             # <<<<<<<<<<<<<<
 *         self.pep = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPDestroy((&__pyx_v_self->pep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 207, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":208
 *         """
 *         CHKERR( PEPDestroy(&self.pep) )
 *         self.pep = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->pep = NULL;

  /* "SLEPc/PEP.pyx":209
 *         CHKERR( PEPDestroy(&self.pep) )
 *         self.pep = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":203
 *         CHKERR( PEPView(self.pep, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the PEP object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":211
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_6reset[] = "PEP.reset(self)\n\n        Resets the PEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_6reset(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/PEP.pyx":215
 *         Resets the PEP object.
 *         """
 *         CHKERR( PEPReset(self.pep) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPReset(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 215, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":211
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the PEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":217
 *         CHKERR( PEPReset(self.pep) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_8create[] = "PEP.create(self, comm=None)\n\n        Creates the PEP object.\n\n        Parameters\n        ----------\n        comm: Comm, optional.\n            MPI communicator. If not provided, it defaults to all\n            processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(15, 217, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 217, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_8create(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_8create(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  PEP __pyx_v_newpep;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/PEP.pyx":227
 *             processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcPEP newpep = NULL
 *         CHKERR( PEPCreate(ccomm, &newpep) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 227, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/PEP.pyx":228
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcPEP newpep = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPCreate(ccomm, &newpep) )
 *         SlepcCLEAR(self.obj); self.pep = newpep
 */
  __pyx_v_newpep = NULL;

  /* "SLEPc/PEP.pyx":229
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcPEP newpep = NULL
 *         CHKERR( PEPCreate(ccomm, &newpep) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.pep = newpep
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPCreate(__pyx_v_ccomm, (&__pyx_v_newpep))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 229, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":230
 *         cdef SlepcPEP newpep = NULL
 *         CHKERR( PEPCreate(ccomm, &newpep) )
 *         SlepcCLEAR(self.obj); self.pep = newpep             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->pep = __pyx_v_newpep;

  /* "SLEPc/PEP.pyx":231
 *         CHKERR( PEPCreate(ccomm, &newpep) )
 *         SlepcCLEAR(self.obj); self.pep = newpep
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, pep_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":217
 *         CHKERR( PEPReset(self.pep) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the PEP object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":233
 *         return self
 * 
 *     def setType(self, pep_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_10setType[] = "PEP.setType(self, pep_type)\n\n        Selects the particular solver to be used in the PEP object.\n\n        Parameters\n        ----------\n        pep_type: `PEP.Type` enumerate\n            The solver to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pep_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pep_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pep_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(15, 233, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_pep_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_pep_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_10setType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_pep_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_pep_type);

  /* "SLEPc/PEP.pyx":242
 *             The solver to be used.
 *         """
 *         cdef SlepcPEPType cval = NULL             # <<<<<<<<<<<<<<
 *         pep_type = str2bytes(pep_type, &cval)
 *         CHKERR( PEPSetType(self.pep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/PEP.pyx":243
 *         """
 *         cdef SlepcPEPType cval = NULL
 *         pep_type = str2bytes(pep_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetType(self.pep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_pep_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_pep_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":244
 *         cdef SlepcPEPType cval = NULL
 *         pep_type = str2bytes(pep_type, &cval)
 *         CHKERR( PEPSetType(self.pep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetType(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 244, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":233
 *         return self
 * 
 *     def setType(self, pep_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the PEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pep_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":246
 *         CHKERR( PEPSetType(self.pep, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the PEP type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_12getType[] = "PEP.getType(self)\n\n        Gets the PEP type of this object.\n\n        Returns\n        -------\n        type: `PEP.Type` enumerate\n            The solver currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_12getType(struct PySlepcPEPObject *__pyx_v_self) {
  const char* __pyx_v_pep_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/PEP.pyx":255
 *             The solver currently being used.
 *         """
 *         cdef SlepcPEPType pep_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetType(self.pep, &pep_type) )
 *         return bytes2str(pep_type)
 */
  __pyx_v_pep_type = NULL;

  /* "SLEPc/PEP.pyx":256
 *         """
 *         cdef SlepcPEPType pep_type = NULL
 *         CHKERR( PEPGetType(self.pep, &pep_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(pep_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetType(__pyx_v_self->pep, (&__pyx_v_pep_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 256, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":257
 *         cdef SlepcPEPType pep_type = NULL
 *         CHKERR( PEPGetType(self.pep, &pep_type) )
 *         return bytes2str(pep_type)             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_pep_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":246
 *         CHKERR( PEPSetType(self.pep, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the PEP type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":259
 *         return bytes2str(pep_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all PEP options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix[] = "PEP.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all PEP options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n            The prefix string set for this PEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/PEP.pyx":269
 *             The prefix string set for this PEP object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/PEP.pyx":270
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetOptionsPrefix(__pyx_v_self->pep, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 270, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":271
 *         cdef const_char *prefix = NULL
 *         CHKERR( PEPGetOptionsPrefix(self.pep, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":259
 *         return bytes2str(pep_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all PEP options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":273
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all PEP options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix[] = "PEP.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all PEP options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all PEP option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(15, 273, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 273, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/PEP.pyx":283
 *             The prefix string to prepend to all PEP option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( PEPSetOptionsPrefix(self.pep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/PEP.pyx":284
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetOptionsPrefix(self.pep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":285
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( PEPSetOptionsPrefix(self.pep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def appendOptionsPrefix(self, prefix):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetOptionsPrefix(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 285, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":273
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all PEP options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":287
 *         CHKERR( PEPSetOptionsPrefix(self.pep, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all PEP options
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix[] = "PEP.appendOptionsPrefix(self, prefix)\n\n        Appends to the prefix used for searching for all PEP options\n        in the database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all PEP option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(15, 287, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 287, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("appendOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/PEP.pyx":297
 *             The prefix string to prepend to all PEP option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( PEPAppendOptionsPrefix(self.pep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/PEP.pyx":298
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPAppendOptionsPrefix(self.pep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":299
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( PEPAppendOptionsPrefix(self.pep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPAppendOptionsPrefix(__pyx_v_self->pep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 299, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":287
 *         CHKERR( PEPSetOptionsPrefix(self.pep, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all PEP options
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":301
 *         CHKERR( PEPAppendOptionsPrefix(self.pep, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets PEP options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_20setFromOptions[] = "PEP.setFromOptions(self)\n\n        Sets PEP options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_20setFromOptions(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/PEP.pyx":307
 *         the solver type.
 *         """
 *         CHKERR( PEPSetFromOptions(self.pep) )             # <<<<<<<<<<<<<<
 * 
 *     def getBasis(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetFromOptions(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 307, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":301
 *         CHKERR( PEPAppendOptionsPrefix(self.pep, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets PEP options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":309
 *         CHKERR( PEPSetFromOptions(self.pep) )
 * 
 *     def getBasis(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of polynomial basis used to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_22getBasis[] = "PEP.getBasis(self)\n\n        Gets the type of polynomial basis used to \n        describe the polynomial eigenvalue problem.\n\n        Returns\n        -------\n        basis: `PEP.Basis` enumerate\n            the basis that was previously set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBasis (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBasis", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBasis", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_22getBasis(struct PySlepcPEPObject *__pyx_v_self) {
  PEPBasis __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getBasis", 0);

  /* "SLEPc/PEP.pyx":319
 *             the basis that was previously set.
 *         """
 *         cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetBasis(self.pep, &val) )
 *         return val
 */
  __pyx_v_val = PEP_BASIS_MONOMIAL;

  /* "SLEPc/PEP.pyx":320
 *         """
 *         cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL
 *         CHKERR( PEPGetBasis(self.pep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetBasis(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 320, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":321
 *         cdef SlepcPEPBasis val = PEP_BASIS_MONOMIAL
 *         CHKERR( PEPGetBasis(self.pep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setBasis(self, basis):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPBasis(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":309
 *         CHKERR( PEPSetFromOptions(self.pep) )
 * 
 *     def getBasis(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the type of polynomial basis used to
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getBasis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":323
 *         return val
 * 
 *     def setBasis(self, basis):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of polynomial basis used to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_24setBasis[] = "PEP.setBasis(self, basis)\n\n        Specifies the type of polynomial basis used to \n        describe the polynomial eigenvalue problem.\n\n        Parameters\n        ----------\n        basis: `PEP.Basis` enumerate\n            the basis to be set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_basis = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBasis (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_basis,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_basis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBasis") < 0)) __PYX_ERR(15, 323, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_basis = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBasis", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 323, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBasis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_basis);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_24setBasis(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_basis) {
  PEPBasis __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPBasis __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setBasis", 0);

  /* "SLEPc/PEP.pyx":333
 *             the basis to be set.
 *         """
 *         cdef SlepcPEPBasis val = basis             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetBasis(self.pep, val) )
 * 
 */
  __pyx_t_1 = ((PEPBasis)__Pyx_PyInt_As_PEPBasis(__pyx_v_basis)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 333, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/PEP.pyx":334
 *         """
 *         cdef SlepcPEPBasis val = basis
 *         CHKERR( PEPSetBasis(self.pep, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getProblemType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetBasis(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 334, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":323
 *         return val
 * 
 *     def setBasis(self, basis):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of polynomial basis used to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBasis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":336
 *         CHKERR( PEPSetBasis(self.pep, val) )
 * 
 *     def getProblemType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the problem type from the PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_26getProblemType[] = "PEP.getProblemType(self)\n\n        Gets the problem type from the PEP object.\n\n        Returns\n        -------\n        problem_type: `PEP.ProblemType` enumerate\n            The problem type that was previously set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getProblemType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getProblemType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getProblemType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_26getProblemType(struct PySlepcPEPObject *__pyx_v_self) {
  PEPProblemType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getProblemType", 0);

  /* "SLEPc/PEP.pyx":345
 *             The problem type that was previously set.
 *         """
 *         cdef SlepcPEPProblemType val = PEP_GENERAL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetProblemType(self.pep, &val) )
 *         return val
 */
  __pyx_v_val = PEP_GENERAL;

  /* "SLEPc/PEP.pyx":346
 *         """
 *         cdef SlepcPEPProblemType val = PEP_GENERAL
 *         CHKERR( PEPGetProblemType(self.pep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetProblemType(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 346, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":347
 *         cdef SlepcPEPProblemType val = PEP_GENERAL
 *         CHKERR( PEPGetProblemType(self.pep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setProblemType(self, problem_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPProblemType(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":336
 *         CHKERR( PEPSetBasis(self.pep, val) )
 * 
 *     def getProblemType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the problem type from the PEP object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":349
 *         return val
 * 
 *     def setProblemType(self, problem_type):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_28setProblemType[] = "PEP.setProblemType(self, problem_type)\n\n        Specifies the type of the eigenvalue problem.\n\n        Parameters\n        ----------\n        problem_type: `PEP.ProblemType` enumerate\n            The problem type to be set.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_problem_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setProblemType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_problem_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_problem_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setProblemType") < 0)) __PYX_ERR(15, 349, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_problem_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setProblemType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 349, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_problem_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_28setProblemType(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_problem_type) {
  PEPProblemType __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPProblemType __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setProblemType", 0);

  /* "SLEPc/PEP.pyx":358
 *             The problem type to be set.
 *         """
 *         cdef SlepcPEPProblemType val = problem_type             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetProblemType(self.pep, val) )
 * 
 */
  __pyx_t_1 = ((PEPProblemType)__Pyx_PyInt_As_PEPProblemType(__pyx_v_problem_type)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 358, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/PEP.pyx":359
 *         """
 *         cdef SlepcPEPProblemType val = problem_type
 *         CHKERR( PEPSetProblemType(self.pep, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getWhichEigenpairs(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetProblemType(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 359, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":349
 *         return val
 * 
 *     def setProblemType(self, problem_type):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies the type of the eigenvalue problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setProblemType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":361
 *         CHKERR( PEPSetProblemType(self.pep, val) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs[] = "PEP.getWhichEigenpairs(self)\n\n        Returns which portion of the spectrum is to be sought.\n\n        Returns\n        -------\n        which: `PEP.Which` enumerate\n            The portion of the spectrum to be sought by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self) {
  PEPWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getWhichEigenpairs", 0);

  /* "SLEPc/PEP.pyx":370
 *             The portion of the spectrum to be sought by the solver.
 *         """
 *         cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetWhichEigenpairs(self.pep, &val) )
 *         return val
 */
  __pyx_v_val = PEP_LARGEST_MAGNITUDE;

  /* "SLEPc/PEP.pyx":371
 *         """
 *         cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE
 *         CHKERR( PEPGetWhichEigenpairs(self.pep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetWhichEigenpairs(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 371, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":372
 *         cdef SlepcPEPWhich val = PEP_LARGEST_MAGNITUDE
 *         CHKERR( PEPGetWhichEigenpairs(self.pep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setWhichEigenpairs(self, which):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":361
 *         CHKERR( PEPSetProblemType(self.pep, val) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":374
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs[] = "PEP.setWhichEigenpairs(self, which)\n\n        Specifies which portion of the spectrum is to be sought.\n\n        Parameters\n        ----------\n        which: `PEP.Which` enumerate\n            The portion of the spectrum to be sought by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_which = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(15, 374, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_which = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 374, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_which);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_which) {
  PEPWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPWhich __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setWhichEigenpairs", 0);

  /* "SLEPc/PEP.pyx":383
 *             The portion of the spectrum to be sought by the solver.
 *         """
 *         cdef SlepcPEPWhich val = which             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetWhichEigenpairs(self.pep, val) )
 * 
 */
  __pyx_t_1 = ((PEPWhich)__Pyx_PyInt_As_PEPWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 383, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/PEP.pyx":384
 *         """
 *         cdef SlepcPEPWhich val = which
 *         CHKERR( PEPSetWhichEigenpairs(self.pep, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getTolerances(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetWhichEigenpairs(__pyx_v_self->pep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 384, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":374
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":386
 *         CHKERR( PEPSetWhichEigenpairs(self.pep, val) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTolerances[] = "PEP.getTolerances(self)\n\n        Gets the tolerance and maximum iteration count used by the\n        default PEP convergence tests.\n\n        Returns\n        -------\n        tol: float\n            The convergence tolerance.\n        max_it: int\n            The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_34getTolerances(struct PySlepcPEPObject *__pyx_v_self) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  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;
  __Pyx_RefNannySetupContext("getTolerances", 0);

  /* "SLEPc/PEP.pyx":398
 *             The maximum number of iterations
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = 0
 *         CHKERR( PEPGetTolerances(self.pep, &rval, &ival) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/PEP.pyx":399
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetTolerances(self.pep, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))
 */
  __pyx_v_ival = 0;

  /* "SLEPc/PEP.pyx":400
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0
 *         CHKERR( PEPGetTolerances(self.pep, &rval, &ival) )             # <<<<<<<<<<<<<<
 *         return (toReal(rval), toInt(ival))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetTolerances(__pyx_v_self->pep, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 400, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":401
 *         cdef PetscInt  ival = 0
 *         CHKERR( PEPGetTolerances(self.pep, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))             # <<<<<<<<<<<<<<
 * 
 *     def setTolerances(self, tol=None, max_it=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":386
 *         CHKERR( PEPSetWhichEigenpairs(self.pep, val) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":403
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTolerances[] = "PEP.setTolerances(self, tol=None, max_it=None)\n\n        Sets the tolerance and maximum iteration count used by the\n        default PEP convergence tests.\n\n        Parameters\n        ----------\n        tol: float, optional\n            The convergence tolerance.\n        max_it: int, optional\n            The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_max_it = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(15, 403, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tol = values[0];
    __pyx_v_max_it = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 403, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_36setTolerances(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscReal __pyx_t_3;
  PetscInt __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("setTolerances", 0);

  /* "SLEPc/PEP.pyx":415
 *             The maximum number of iterations
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":416
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":417
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)             # <<<<<<<<<<<<<<
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( PEPSetTolerances(self.pep, rval, ival) )
 */
  __pyx_t_1 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 417, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":418
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetTolerances(self.pep, rval, ival) )
 * 
 */
  __pyx_t_2 = (__pyx_v_max_it != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 418, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":419
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( PEPSetTolerances(self.pep, rval, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getConvergenceTest(self):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetTolerances(__pyx_v_self->pep, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(15, 419, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":403
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":421
 *         CHKERR( PEPSetTolerances(self.pep, rval, ival) )
 * 
 *     def getConvergenceTest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the method used to compute the error estimate
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_38getConvergenceTest[] = "PEP.getConvergenceTest(self)\n\n        Return the method used to compute the error estimate \n        used in the convergence test. \n\n        Returns\n        -------\n        conv: PEP.Conv\n            The method used to compute the error estimate \n            used in the convergence test. \n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergenceTest (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergenceTest", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergenceTest", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_38getConvergenceTest(struct PySlepcPEPObject *__pyx_v_self) {
  PEPConv __pyx_v_conv;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergenceTest", 0);

  /* "SLEPc/PEP.pyx":432
 *             used in the convergence test.
 *         """
 *         cdef SlepcPEPConv conv = PEP_CONV_REL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetConvergenceTest(self.pep, &conv) )
 *         return conv
 */
  __pyx_v_conv = PEP_CONV_REL;

  /* "SLEPc/PEP.pyx":433
 *         """
 *         cdef SlepcPEPConv conv = PEP_CONV_REL
 *         CHKERR( PEPGetConvergenceTest(self.pep, &conv) )             # <<<<<<<<<<<<<<
 *         return conv
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConvergenceTest(__pyx_v_self->pep, (&__pyx_v_conv))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 433, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":434
 *         cdef SlepcPEPConv conv = PEP_CONV_REL
 *         CHKERR( PEPGetConvergenceTest(self.pep, &conv) )
 *         return conv             # <<<<<<<<<<<<<<
 * 
 *     def setConvergenceTest(self, conv):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPConv(__pyx_v_conv); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":421
 *         CHKERR( PEPSetTolerances(self.pep, rval, ival) )
 * 
 *     def getConvergenceTest(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the method used to compute the error estimate
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":436
 *         return conv
 * 
 *     def setConvergenceTest(self, conv):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies how to compute the error estimate
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_40setConvergenceTest[] = "PEP.setConvergenceTest(self, conv)\n\n        Specifies how to compute the error estimate \n        used in the convergence test. \n\n        Parameters\n        ----------\n        conv: PEP.Conv\n            The method used to compute the error estimate \n            used in the convergence test.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_conv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setConvergenceTest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_conv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_conv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConvergenceTest") < 0)) __PYX_ERR(15, 436, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_conv = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setConvergenceTest", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 436, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_conv);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_40setConvergenceTest(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_conv) {
  PEPConv __pyx_v_tconv;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPConv __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setConvergenceTest", 0);

  /* "SLEPc/PEP.pyx":447
 *             used in the convergence test.
 *         """
 *         cdef SlepcPEPConv tconv = conv             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetConvergenceTest(self.pep, tconv) )
 * 
 */
  __pyx_t_1 = ((PEPConv)__Pyx_PyInt_As_PEPConv(__pyx_v_conv)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 447, __pyx_L1_error)
  __pyx_v_tconv = __pyx_t_1;

  /* "SLEPc/PEP.pyx":448
 *         """
 *         cdef SlepcPEPConv tconv = conv
 *         CHKERR( PEPSetConvergenceTest(self.pep, tconv) )             # <<<<<<<<<<<<<<
 * 
 *     def getRefine(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetConvergenceTest(__pyx_v_self->pep, __pyx_v_tconv)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 448, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":436
 *         return conv
 * 
 *     def setConvergenceTest(self, conv):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies how to compute the error estimate
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setConvergenceTest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":450
 *         CHKERR( PEPSetConvergenceTest(self.pep, tconv) )
 * 
 *     def getRefine(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the refinement strategy used by the PEP object,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_42getRefine[] = "PEP.getRefine(self)\n\n        Gets the refinement strategy used by the PEP object, \n        and the associated parameters. \n\n        Returns\n        -------\n        ref: PEP.Refine\n            The refinement type.\n        npart: int\n            The number of partitions of the communicator.\n        tol: real\n            The convergence tolerance.\n        its: int\n            The maximum number of refinement iterations.\n        scheme: PEP.RefineScheme\n            Scheme for solving linear systems\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRefine (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRefine", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRefine", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_42getRefine(struct PySlepcPEPObject *__pyx_v_self) {
  PEPRefine __pyx_v_ref;
  PetscInt __pyx_v_npart;
  PetscReal __pyx_v_tol;
  PetscInt __pyx_v_its;
  PEPRefineScheme __pyx_v_scheme;
  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 = NULL;
  __Pyx_RefNannySetupContext("getRefine", 0);

  /* "SLEPc/PEP.pyx":468
 *             Scheme for solving linear systems
 *         """
 *         cdef SlepcPEPRefine ref = PEP_REFINE_NONE             # <<<<<<<<<<<<<<
 *         cdef PetscInt npart = 1
 *         cdef PetscReal tol = PETSC_DEFAULT
 */
  __pyx_v_ref = PEP_REFINE_NONE;

  /* "SLEPc/PEP.pyx":469
 *         """
 *         cdef SlepcPEPRefine ref = PEP_REFINE_NONE
 *         cdef PetscInt npart = 1             # <<<<<<<<<<<<<<
 *         cdef PetscReal tol = PETSC_DEFAULT
 *         cdef PetscInt its = PETSC_DEFAULT
 */
  __pyx_v_npart = 1;

  /* "SLEPc/PEP.pyx":470
 *         cdef SlepcPEPRefine ref = PEP_REFINE_NONE
 *         cdef PetscInt npart = 1
 *         cdef PetscReal tol = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt its = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE
 */
  __pyx_v_tol = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":471
 *         cdef PetscInt npart = 1
 *         cdef PetscReal tol = PETSC_DEFAULT
 *         cdef PetscInt its = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE
 *         CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) )
 */
  __pyx_v_its = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":472
 *         cdef PetscReal tol = PETSC_DEFAULT
 *         cdef PetscInt its = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) )
 *         return (ref, toInt(npart), toReal(tol), toInt(its), scheme)
 */
  __pyx_v_scheme = PEP_REFINE_SCHEME_MBE;

  /* "SLEPc/PEP.pyx":473
 *         cdef PetscInt its = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE
 *         CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) )             # <<<<<<<<<<<<<<
 *         return (ref, toInt(npart), toReal(tol), toInt(its), scheme)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRefine(__pyx_v_self->pep, (&__pyx_v_ref), (&__pyx_v_npart), (&__pyx_v_tol), (&__pyx_v_its), (&__pyx_v_scheme))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 473, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":474
 *         cdef SlepcPEPRefineScheme scheme = PEP_REFINE_SCHEME_MBE
 *         CHKERR( PEPGetRefine(self.pep, &ref, &npart, &tol, &its, &scheme) )
 *         return (ref, toInt(npart), toReal(tol), toInt(its), scheme)             # <<<<<<<<<<<<<<
 * 
 *     def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPRefine(__pyx_v_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_npart); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_tol); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_PEPRefineScheme(__pyx_v_scheme); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":450
 *         CHKERR( PEPSetConvergenceTest(self.pep, tconv) )
 * 
 *     def getRefine(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the refinement strategy used by the PEP object,
 */

  /* 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_7);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getRefine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":476
 *         return (ref, toInt(npart), toReal(tol), toInt(its), scheme)
 * 
 *     def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the refinement strategy used by the PEP object,
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_44setRefine[] = "PEP.setRefine(self, ref, npart=None, tol=None, its=None, scheme=None)\n\n        Sets the refinement strategy used by the PEP object, \n        and the associated parameters. \n\n        Parameters\n        ----------\n        ref: PEP.Refine\n            The refinement type.\n        npart: int, optional\n            The number of partitions of the communicator.\n        tol: real, optional\n            The convergence tolerance.\n        its: int, optional\n            The maximum number of refinement iterations.\n        scheme: PEP.RefineScheme, optional\n            Scheme for linear system solves\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_npart = 0;
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_its = 0;
  PyObject *__pyx_v_scheme = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRefine (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_npart,&__pyx_n_s_tol,&__pyx_n_s_its,&__pyx_n_s_scheme,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((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  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_npart);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_its);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scheme);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRefine") < 0)) __PYX_ERR(15, 476, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_ref = values[0];
    __pyx_v_npart = values[1];
    __pyx_v_tol = values[2];
    __pyx_v_its = values[3];
    __pyx_v_scheme = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRefine", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 476, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRefine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_ref, __pyx_v_npart, __pyx_v_tol, __pyx_v_its, __pyx_v_scheme);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_44setRefine(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_npart, PyObject *__pyx_v_tol, PyObject *__pyx_v_its, PyObject *__pyx_v_scheme) {
  PEPRefine __pyx_v_tref;
  PetscInt __pyx_v_tnpart;
  PetscReal __pyx_v_ttol;
  PetscInt __pyx_v_tits;
  PEPRefineScheme __pyx_v_tscheme;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPRefine __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PetscInt __pyx_t_4;
  PetscReal __pyx_t_5;
  PEPRefineScheme __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setRefine", 0);

  /* "SLEPc/PEP.pyx":494
 *             Scheme for linear system solves
 *         """
 *         cdef SlepcPEPRefine tref = ref             # <<<<<<<<<<<<<<
 *         cdef PetscInt tnpart = 1
 *         cdef PetscReal ttol = PETSC_DEFAULT
 */
  __pyx_t_1 = ((PEPRefine)__Pyx_PyInt_As_PEPRefine(__pyx_v_ref)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 494, __pyx_L1_error)
  __pyx_v_tref = __pyx_t_1;

  /* "SLEPc/PEP.pyx":495
 *         """
 *         cdef SlepcPEPRefine tref = ref
 *         cdef PetscInt tnpart = 1             # <<<<<<<<<<<<<<
 *         cdef PetscReal ttol = PETSC_DEFAULT
 *         cdef PetscInt tits = PETSC_DEFAULT
 */
  __pyx_v_tnpart = 1;

  /* "SLEPc/PEP.pyx":496
 *         cdef SlepcPEPRefine tref = ref
 *         cdef PetscInt tnpart = 1
 *         cdef PetscReal ttol = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt tits = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE
 */
  __pyx_v_ttol = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":497
 *         cdef PetscInt tnpart = 1
 *         cdef PetscReal ttol = PETSC_DEFAULT
 *         cdef PetscInt tits = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE
 *         if npart is not None: tnpart = asInt(npart)
 */
  __pyx_v_tits = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":498
 *         cdef PetscReal ttol = PETSC_DEFAULT
 *         cdef PetscInt tits = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE             # <<<<<<<<<<<<<<
 *         if npart is not None: tnpart = asInt(npart)
 *         if tol is not None: ttol = asReal(tol)
 */
  __pyx_v_tscheme = PEP_REFINE_SCHEME_MBE;

  /* "SLEPc/PEP.pyx":499
 *         cdef PetscInt tits = PETSC_DEFAULT
 *         cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE
 *         if npart is not None: tnpart = asInt(npart)             # <<<<<<<<<<<<<<
 *         if tol is not None: ttol = asReal(tol)
 *         if its is not None: tits = asInt(its)
 */
  __pyx_t_2 = (__pyx_v_npart != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_npart); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 499, __pyx_L1_error)
    __pyx_v_tnpart = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":500
 *         cdef SlepcPEPRefineScheme tscheme = PEP_REFINE_SCHEME_MBE
 *         if npart is not None: tnpart = asInt(npart)
 *         if tol is not None: ttol = asReal(tol)             # <<<<<<<<<<<<<<
 *         if its is not None: tits = asInt(its)
 *         if scheme is not None: tscheme = scheme
 */
  __pyx_t_3 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_5 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 500, __pyx_L1_error)
    __pyx_v_ttol = __pyx_t_5;
  }

  /* "SLEPc/PEP.pyx":501
 *         if npart is not None: tnpart = asInt(npart)
 *         if tol is not None: ttol = asReal(tol)
 *         if its is not None: tits = asInt(its)             # <<<<<<<<<<<<<<
 *         if scheme is not None: tscheme = scheme
 *         CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) )
 */
  __pyx_t_2 = (__pyx_v_its != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_its); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(15, 501, __pyx_L1_error)
    __pyx_v_tits = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":502
 *         if tol is not None: ttol = asReal(tol)
 *         if its is not None: tits = asInt(its)
 *         if scheme is not None: tscheme = scheme             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) )
 * 
 */
  __pyx_t_3 = (__pyx_v_scheme != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_6 = ((PEPRefineScheme)__Pyx_PyInt_As_PEPRefineScheme(__pyx_v_scheme)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 502, __pyx_L1_error)
    __pyx_v_tscheme = __pyx_t_6;
  }

  /* "SLEPc/PEP.pyx":503
 *         if its is not None: tits = asInt(its)
 *         if scheme is not None: tscheme = scheme
 *         CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) )             # <<<<<<<<<<<<<<
 * 
 *     def getTrackAll(self):
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetRefine(__pyx_v_self->pep, __pyx_v_tref, __pyx_v_tnpart, __pyx_v_ttol, __pyx_v_tits, __pyx_v_tscheme)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 503, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":476
 *         return (ref, toInt(npart), toReal(tol), toInt(its), scheme)
 * 
 *     def setRefine(self, ref, npart=None, tol=None, its=None, scheme=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the refinement strategy used by the PEP object,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRefine", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":505
 *         CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_46getTrackAll[] = "PEP.getTrackAll(self)\n\n        Returns the flag indicating whether all residual norms must be\n        computed or not.\n\n        Returns\n        -------\n        trackall: bool\n            Whether the solver compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_46getTrackAll(struct PySlepcPEPObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrackAll", 0);

  /* "SLEPc/PEP.pyx":515
 *             Whether the solver compute all residuals or not.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetTrackAll(self.pep, &tval) )
 *         return <bint>tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/PEP.pyx":516
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( PEPGetTrackAll(self.pep, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint>tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetTrackAll(__pyx_v_self->pep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 516, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":517
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( PEPGetTrackAll(self.pep, &tval) )
 *         return <bint>tval             # <<<<<<<<<<<<<<
 * 
 *     def setTrackAll(self, trackall):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":505
 *         CHKERR( PEPSetRefine(self.pep, tref, tnpart, ttol, tits, tscheme) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":519
 *         return <bint>tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_48setTrackAll[] = "PEP.setTrackAll(self, trackall)\n\n        Specifies if the solver must compute the residual of all\n        approximate eigenpairs or not.\n\n        Parameters\n        ----------\n        trackall: bool\n            Whether compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_trackall = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(15, 519, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_trackall = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 519, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_trackall);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_48setTrackAll(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_trackall) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTrackAll", 0);

  /* "SLEPc/PEP.pyx":529
 *             Whether compute all residuals or not.
 *         """
 *         cdef PetscBool tval = trackall             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetTrackAll(self.pep, tval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 529, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_1;

  /* "SLEPc/PEP.pyx":530
 *         """
 *         cdef PetscBool tval = trackall
 *         CHKERR( PEPSetTrackAll(self.pep, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetTrackAll(__pyx_v_self->pep, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 530, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":519
 *         return <bint>tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":532
 *         CHKERR( PEPSetTrackAll(self.pep, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_50getDimensions[] = "PEP.getDimensions(self)\n\n        Gets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Returns\n        -------\n        nev: int\n            Number of eigenvalues to compute.\n        ncv: int\n            Maximum dimension of the subspace to be used by the solver.\n        mpd: int\n            Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_50getDimensions(struct PySlepcPEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  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;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/PEP.pyx":546
 *             Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/PEP.pyx":547
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) )
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/PEP.pyx":548
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/PEP.pyx":549
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetDimensions(__pyx_v_self->pep, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 549, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":550
 *         cdef PetscInt ival3 = 0
 *         CHKERR( PEPGetDimensions(self.pep, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":532
 *         CHKERR( PEPSetTrackAll(self.pep, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

  /* 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_AddTraceback("slepc4py.SLEPc.PEP.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":552
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_52setDimensions[] = "PEP.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n        Sets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Parameters\n        ----------\n        nev: int, optional\n            Number of eigenvalues to compute.\n        ncv: int, optional\n            Maximum dimension of the subspace to be used by the\n            solver.\n        mpd: int, optional\n            Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nev = 0;
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_v_mpd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(15, 552, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_nev = values[0];
    __pyx_v_ncv = values[1];
    __pyx_v_mpd = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 552, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_52setDimensions(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/PEP.pyx":567
 *             Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":568
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":569
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 */
  __pyx_v_ival3 = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":570
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)             # <<<<<<<<<<<<<<
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 */
  __pyx_t_1 = (__pyx_v_nev != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 570, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":571
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)             # <<<<<<<<<<<<<<
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) )
 */
  __pyx_t_2 = (__pyx_v_ncv != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 571, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":572
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) )
 * 
 */
  __pyx_t_1 = (__pyx_v_mpd != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(15, 572, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":573
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) )             # <<<<<<<<<<<<<<
 * 
 *     def getST(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetDimensions(__pyx_v_self->pep, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 573, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":552
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":575
 *         CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) )
 * 
 *     def getST(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the spectral transformation (`ST`) object associated to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_54getST[] = "PEP.getST(self)\n\n        Obtain the spectral transformation (`ST`) object associated to\n        the eigensolver object.\n\n        Returns\n        -------\n        st: ST\n            The spectral transformation.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getST (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getST", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getST", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_54getST(struct PySlepcPEPObject *__pyx_v_self) {
  struct PySlepcSTObject *__pyx_v_st = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getST", 0);

  /* "SLEPc/PEP.pyx":585
 *             The spectral transformation.
 *         """
 *         cdef ST st = ST()             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetST(self.pep, &st.st) )
 *         PetscINCREF(st.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_st = ((struct PySlepcSTObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":586
 *         """
 *         cdef ST st = ST()
 *         CHKERR( PEPGetST(self.pep, &st.st) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(st.obj)
 *         return st
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetST(__pyx_v_self->pep, (&__pyx_v_st->st))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 586, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":587
 *         cdef ST st = ST()
 *         CHKERR( PEPGetST(self.pep, &st.st) )
 *         PetscINCREF(st.obj)             # <<<<<<<<<<<<<<
 *         return st
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_st->__pyx_base.obj);

  /* "SLEPc/PEP.pyx":588
 *         CHKERR( PEPGetST(self.pep, &st.st) )
 *         PetscINCREF(st.obj)
 *         return st             # <<<<<<<<<<<<<<
 * 
 *     def setST(self, ST st not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_st));
  __pyx_r = ((PyObject *)__pyx_v_st);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":575
 *         CHKERR( PEPSetDimensions(self.pep, ival1, ival2, ival3) )
 * 
 *     def getST(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the spectral transformation (`ST`) object associated to
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_st);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":590
 *         return st
 * 
 *     def setST(self, ST st not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a spectral transformation object to the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_56setST[] = "PEP.setST(self, ST st)\n\n        Associates a spectral transformation object to the\n        eigensolver.\n\n        Parameters\n        ----------\n        st: ST\n            The spectral transformation.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcSTObject *__pyx_v_st = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setST (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setST") < 0)) __PYX_ERR(15, 590, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_st = ((struct PySlepcSTObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setST", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 590, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), __pyx_ptype_8slepc4py_5SLEPc_ST, 0, "st", 0))) __PYX_ERR(15, 590, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_st);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_56setST(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcSTObject *__pyx_v_st) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setST", 0);

  /* "SLEPc/PEP.pyx":600
 *             The spectral transformation.
 *         """
 *         CHKERR( PEPSetST(self.pep, st.st) )             # <<<<<<<<<<<<<<
 * 
 *     def getScale(self, Vec Dl=None, Vec Dr=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetST(__pyx_v_self->pep, __pyx_v_st->st)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 600, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":590
 *         return st
 * 
 *     def setST(self, ST st not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a spectral transformation object to the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setST", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":602
 *         CHKERR( PEPSetST(self.pep, st.st) )
 * 
 *     def getScale(self, Vec Dl=None, Vec Dr=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the strategy used for scaling the polynomial eigenproblem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_58getScale[] = "PEP.getScale(self, Vec Dl=None, Vec Dr=None)\n\n        Gets the strategy used for scaling the polynomial eigenproblem.\n\n        Parameters\n        ----------\n        Dl: Vec, optional\n            Placeholder for the returned left diagonal matrix.\n        Dr: Vec, optional\n            Placeholder for the returned right diagonal matrix.\n\n        Returns\n        -------\n        scale: `PEP.Scale` enumerate\n            The scaling strategy.\n        alpha: real\n            The scaling factor.\n        its: integer\n            The number of iteration of diagonal scaling.\n        lbda: real\n            Approximation of the wanted eigenvalues (modulus).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_Dl = 0;
  struct PyPetscVecObject *__pyx_v_Dr = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getScale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Dl,&__pyx_n_s_Dr,0};
    PyObject* values[2] = {0,0};
    values[0] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[1] = (PyObject *)((struct PyPetscVecObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dl);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dr);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getScale") < 0)) __PYX_ERR(15, 602, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_Dl = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_Dr = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getScale", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 602, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dl), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dl", 0))) __PYX_ERR(15, 602, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(15, 602, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_Dl, __pyx_v_Dr);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_58getScale(struct PySlepcPEPObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr) {
  PEPScale __pyx_v_scale;
  PetscReal __pyx_v_alpha;
  PetscInt __pyx_v_its;
  PetscReal __pyx_v_lbda;
  Vec __pyx_v_vecl;
  Vec __pyx_v_vecr;
  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("getScale", 0);

  /* "SLEPc/PEP.pyx":624
 *             Approximation of the wanted eigenvalues (modulus).
 *         """
 *         cdef SlepcPEPScale scale = PEP_SCALE_NONE             # <<<<<<<<<<<<<<
 *         cdef PetscReal alpha = 0
 *         cdef PetscInt its = 0
 */
  __pyx_v_scale = PEP_SCALE_NONE;

  /* "SLEPc/PEP.pyx":625
 *         """
 *         cdef SlepcPEPScale scale = PEP_SCALE_NONE
 *         cdef PetscReal alpha = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt its = 0
 *         cdef PetscReal lbda = 0
 */
  __pyx_v_alpha = 0.0;

  /* "SLEPc/PEP.pyx":626
 *         cdef SlepcPEPScale scale = PEP_SCALE_NONE
 *         cdef PetscReal alpha = 0
 *         cdef PetscInt its = 0             # <<<<<<<<<<<<<<
 *         cdef PetscReal lbda = 0
 *         cdef PetscVec vecl = NULL
 */
  __pyx_v_its = 0;

  /* "SLEPc/PEP.pyx":627
 *         cdef PetscReal alpha = 0
 *         cdef PetscInt its = 0
 *         cdef PetscReal lbda = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL
 */
  __pyx_v_lbda = 0.0;

  /* "SLEPc/PEP.pyx":628
 *         cdef PetscInt its = 0
 *         cdef PetscReal lbda = 0
 *         cdef PetscVec vecl = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecr = NULL
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 */
  __pyx_v_vecl = NULL;

  /* "SLEPc/PEP.pyx":629
 *         cdef PetscReal lbda = 0
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 *         if Dl.vec != NULL:
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/PEP.pyx":630
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )             # <<<<<<<<<<<<<<
 *         if Dl.vec != NULL:
 *             if vecl != NULL:
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetScale(__pyx_v_self->pep, (&__pyx_v_scale), (&__pyx_v_alpha), (&__pyx_v_vecl), (&__pyx_v_vecr), (&__pyx_v_its), (&__pyx_v_lbda))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 630, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":631
 *         cdef PetscVec vecr = NULL
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 *         if Dl.vec != NULL:             # <<<<<<<<<<<<<<
 *             if vecl != NULL:
 *                 CHKERR( VecCopy(vecl, Dl.vec) )
 */
  __pyx_t_2 = ((__pyx_v_Dl->vec != NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/PEP.pyx":632
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 *         if Dl.vec != NULL:
 *             if vecl != NULL:             # <<<<<<<<<<<<<<
 *                 CHKERR( VecCopy(vecl, Dl.vec) )
 *             else:
 */
    __pyx_t_2 = ((__pyx_v_vecl != NULL) != 0);
    if (__pyx_t_2) {

      /* "SLEPc/PEP.pyx":633
 *         if Dl.vec != NULL:
 *             if vecl != NULL:
 *                 CHKERR( VecCopy(vecl, Dl.vec) )             # <<<<<<<<<<<<<<
 *             else:
 *                 CHKERR( VecSet(Dl.vec, 1.0) )
 */
      __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecCopy(__pyx_v_vecl, __pyx_v_Dl->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 633, __pyx_L1_error)

      /* "SLEPc/PEP.pyx":632
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 *         if Dl.vec != NULL:
 *             if vecl != NULL:             # <<<<<<<<<<<<<<
 *                 CHKERR( VecCopy(vecl, Dl.vec) )
 *             else:
 */
      goto __pyx_L4;
    }

    /* "SLEPc/PEP.pyx":635
 *                 CHKERR( VecCopy(vecl, Dl.vec) )
 *             else:
 *                 CHKERR( VecSet(Dl.vec, 1.0) )             # <<<<<<<<<<<<<<
 *         if Dr.vec != NULL:
 *             if vecr != NULL:
 */
    /*else*/ {
      __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecSet(__pyx_v_Dl->vec, 1.0)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 635, __pyx_L1_error)
    }
    __pyx_L4:;

    /* "SLEPc/PEP.pyx":631
 *         cdef PetscVec vecr = NULL
 *         CHKERR( PEPGetScale(self.pep, &scale, &alpha, &vecl, &vecr, &its, &lbda) )
 *         if Dl.vec != NULL:             # <<<<<<<<<<<<<<
 *             if vecl != NULL:
 *                 CHKERR( VecCopy(vecl, Dl.vec) )
 */
  }

  /* "SLEPc/PEP.pyx":636
 *             else:
 *                 CHKERR( VecSet(Dl.vec, 1.0) )
 *         if Dr.vec != NULL:             # <<<<<<<<<<<<<<
 *             if vecr != NULL:
 *                 CHKERR( VecCopy(vecr, Dr.vec) )
 */
  __pyx_t_2 = ((__pyx_v_Dr->vec != NULL) != 0);
  if (__pyx_t_2) {

    /* "SLEPc/PEP.pyx":637
 *                 CHKERR( VecSet(Dl.vec, 1.0) )
 *         if Dr.vec != NULL:
 *             if vecr != NULL:             # <<<<<<<<<<<<<<
 *                 CHKERR( VecCopy(vecr, Dr.vec) )
 *             else:
 */
    __pyx_t_2 = ((__pyx_v_vecr != NULL) != 0);
    if (__pyx_t_2) {

      /* "SLEPc/PEP.pyx":638
 *         if Dr.vec != NULL:
 *             if vecr != NULL:
 *                 CHKERR( VecCopy(vecr, Dr.vec) )             # <<<<<<<<<<<<<<
 *             else:
 *                 CHKERR( VecSet(Dr.vec, 1.0) )
 */
      __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecCopy(__pyx_v_vecr, __pyx_v_Dr->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 638, __pyx_L1_error)

      /* "SLEPc/PEP.pyx":637
 *                 CHKERR( VecSet(Dl.vec, 1.0) )
 *         if Dr.vec != NULL:
 *             if vecr != NULL:             # <<<<<<<<<<<<<<
 *                 CHKERR( VecCopy(vecr, Dr.vec) )
 *             else:
 */
      goto __pyx_L6;
    }

    /* "SLEPc/PEP.pyx":640
 *                 CHKERR( VecCopy(vecr, Dr.vec) )
 *             else:
 *                 CHKERR( VecSet(Dr.vec, 1.0) )             # <<<<<<<<<<<<<<
 *         CHKERR( VecDestroy(&vecl) )
 *         CHKERR( VecDestroy(&vecr) )
 */
    /*else*/ {
      __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecSet(__pyx_v_Dr->vec, 1.0)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 640, __pyx_L1_error)
    }
    __pyx_L6:;

    /* "SLEPc/PEP.pyx":636
 *             else:
 *                 CHKERR( VecSet(Dl.vec, 1.0) )
 *         if Dr.vec != NULL:             # <<<<<<<<<<<<<<
 *             if vecr != NULL:
 *                 CHKERR( VecCopy(vecr, Dr.vec) )
 */
  }

  /* "SLEPc/PEP.pyx":641
 *             else:
 *                 CHKERR( VecSet(Dr.vec, 1.0) )
 *         CHKERR( VecDestroy(&vecl) )             # <<<<<<<<<<<<<<
 *         CHKERR( VecDestroy(&vecr) )
 *         return (scale, toReal(alpha), toInt(its), toReal(lbda))
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDestroy((&__pyx_v_vecl))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 641, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":642
 *                 CHKERR( VecSet(Dr.vec, 1.0) )
 *         CHKERR( VecDestroy(&vecl) )
 *         CHKERR( VecDestroy(&vecr) )             # <<<<<<<<<<<<<<
 *         return (scale, toReal(alpha), toInt(its), toReal(lbda))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(VecDestroy((&__pyx_v_vecr))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 642, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":643
 *         CHKERR( VecDestroy(&vecl) )
 *         CHKERR( VecDestroy(&vecr) )
 *         return (scale, toReal(alpha), toInt(its), toReal(lbda))             # <<<<<<<<<<<<<<
 * 
 *     def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_PEPScale(__pyx_v_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_alpha); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_its); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_lbda); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":602
 *         CHKERR( PEPSetST(self.pep, st.st) )
 * 
 *     def getScale(self, Vec Dl=None, Vec Dr=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the strategy used for scaling the polynomial eigenproblem.
 */

  /* 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("slepc4py.SLEPc.PEP.getScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":645
 *         return (scale, toReal(alpha), toInt(its), toReal(lbda))
 * 
 *     def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the scaling strategy to be used for scaling the polynomial problem
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_60setScale[] = "PEP.setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None)\n\n        Sets the scaling strategy to be used for scaling the polynomial problem\n        before attempting to solve.\n\n        Parameters\n        ----------\n        scale: `PEP.Scale` enumerate\n            The scaling strategy.\n        alpha: real, optional\n            The scaling factor.\n        Dl: Vec, optional\n            The left diagonal matrix.\n        Dr: Vec, optional\n            The right diagonal matrix.\n        its: integer, optional\n            The number of iteration of diagonal scaling.\n        lbda: real, optional\n            Approximation of the wanted eigenvalues (modulus).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_scale = 0;
  PyObject *__pyx_v_alpha = 0;
  struct PyPetscVecObject *__pyx_v_Dl = 0;
  struct PyPetscVecObject *__pyx_v_Dr = 0;
  PyObject *__pyx_v_its = 0;
  PyObject *__pyx_v_lbda = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setScale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scale,&__pyx_n_s_alpha,&__pyx_n_s_Dl,&__pyx_n_s_Dr,&__pyx_n_s_its,&__pyx_n_s_lbda,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[3] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[4] = ((PyObject *)Py_None);
    values[5] = ((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);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scale)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alpha);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dl);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Dr);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_its);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lbda);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setScale") < 0)) __PYX_ERR(15, 645, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_scale = values[0];
    __pyx_v_alpha = values[1];
    __pyx_v_Dl = ((struct PyPetscVecObject *)values[2]);
    __pyx_v_Dr = ((struct PyPetscVecObject *)values[3]);
    __pyx_v_its = values[4];
    __pyx_v_lbda = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setScale", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 645, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dl), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dl", 0))) __PYX_ERR(15, 645, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Dr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Dr", 0))) __PYX_ERR(15, 645, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_scale, __pyx_v_alpha, __pyx_v_Dl, __pyx_v_Dr, __pyx_v_its, __pyx_v_lbda);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_60setScale(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_scale, PyObject *__pyx_v_alpha, struct PyPetscVecObject *__pyx_v_Dl, struct PyPetscVecObject *__pyx_v_Dr, PyObject *__pyx_v_its, PyObject *__pyx_v_lbda) {
  PEPScale __pyx_v_senum;
  PetscReal __pyx_v_rval1;
  PetscInt __pyx_v_ival;
  PetscReal __pyx_v_rval2;
  Vec __pyx_v_vecl;
  Vec __pyx_v_vecr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PEPScale __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PetscReal __pyx_t_4;
  Vec __pyx_t_5;
  PetscInt __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setScale", 0);

  /* "SLEPc/PEP.pyx":665
 *             Approximation of the wanted eigenvalues (modulus).
 *         """
 *         cdef SlepcPEPScale senum = scale             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval1 = PETSC_DEFAULT
 *         cdef PetscInt ival = PETSC_DEFAULT
 */
  __pyx_t_1 = ((PEPScale)__Pyx_PyInt_As_PEPScale(__pyx_v_scale)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 665, __pyx_L1_error)
  __pyx_v_senum = __pyx_t_1;

  /* "SLEPc/PEP.pyx":666
 *         """
 *         cdef SlepcPEPScale senum = scale
 *         cdef PetscReal rval1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival = PETSC_DEFAULT
 *         cdef PetscReal rval2 = PETSC_DEFAULT
 */
  __pyx_v_rval1 = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":667
 *         cdef SlepcPEPScale senum = scale
 *         cdef PetscReal rval1 = PETSC_DEFAULT
 *         cdef PetscInt ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval2 = PETSC_DEFAULT
 *         cdef PetscVec vecl = NULL
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":668
 *         cdef PetscReal rval1 = PETSC_DEFAULT
 *         cdef PetscInt ival = PETSC_DEFAULT
 *         cdef PetscReal rval2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL
 */
  __pyx_v_rval2 = PETSC_DEFAULT;

  /* "SLEPc/PEP.pyx":669
 *         cdef PetscInt ival = PETSC_DEFAULT
 *         cdef PetscReal rval2 = PETSC_DEFAULT
 *         cdef PetscVec vecl = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecr = NULL
 *         if alpha is not None: rval1 = asReal(alpha)
 */
  __pyx_v_vecl = NULL;

  /* "SLEPc/PEP.pyx":670
 *         cdef PetscReal rval2 = PETSC_DEFAULT
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         if alpha is not None: rval1 = asReal(alpha)
 *         if Dl is not None:    vecl = Dl.vec
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/PEP.pyx":671
 *         cdef PetscVec vecl = NULL
 *         cdef PetscVec vecr = NULL
 *         if alpha is not None: rval1 = asReal(alpha)             # <<<<<<<<<<<<<<
 *         if Dl is not None:    vecl = Dl.vec
 *         if Dr is not None:    vecr = Dr.vec
 */
  __pyx_t_2 = (__pyx_v_alpha != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_alpha); if (unlikely(__pyx_t_4 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 671, __pyx_L1_error)
    __pyx_v_rval1 = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":672
 *         cdef PetscVec vecr = NULL
 *         if alpha is not None: rval1 = asReal(alpha)
 *         if Dl is not None:    vecl = Dl.vec             # <<<<<<<<<<<<<<
 *         if Dr is not None:    vecr = Dr.vec
 *         if its is not None:   ival = asInt(its)
 */
  __pyx_t_3 = (((PyObject *)__pyx_v_Dl) != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_5 = __pyx_v_Dl->vec;
    __pyx_v_vecl = __pyx_t_5;
  }

  /* "SLEPc/PEP.pyx":673
 *         if alpha is not None: rval1 = asReal(alpha)
 *         if Dl is not None:    vecl = Dl.vec
 *         if Dr is not None:    vecr = Dr.vec             # <<<<<<<<<<<<<<
 *         if its is not None:   ival = asInt(its)
 *         if lbda is not None:  rval2 = asReal(lbda)
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Dr) != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_5 = __pyx_v_Dr->vec;
    __pyx_v_vecr = __pyx_t_5;
  }

  /* "SLEPc/PEP.pyx":674
 *         if Dl is not None:    vecl = Dl.vec
 *         if Dr is not None:    vecr = Dr.vec
 *         if its is not None:   ival = asInt(its)             # <<<<<<<<<<<<<<
 *         if lbda is not None:  rval2 = asReal(lbda)
 *         CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) )
 */
  __pyx_t_3 = (__pyx_v_its != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {
    __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_its); if (unlikely(__pyx_t_6 == -1L && PyErr_Occurred())) __PYX_ERR(15, 674, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_6;
  }

  /* "SLEPc/PEP.pyx":675
 *         if Dr is not None:    vecr = Dr.vec
 *         if its is not None:   ival = asInt(its)
 *         if lbda is not None:  rval2 = asReal(lbda)             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) )
 * 
 */
  __pyx_t_2 = (__pyx_v_lbda != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_lbda); if (unlikely(__pyx_t_4 == -1.0 && PyErr_Occurred())) __PYX_ERR(15, 675, __pyx_L1_error)
    __pyx_v_rval2 = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":676
 *         if its is not None:   ival = asInt(its)
 *         if lbda is not None:  rval2 = asReal(lbda)
 *         CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) )             # <<<<<<<<<<<<<<
 * 
 *     def getBV(self):
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetScale(__pyx_v_self->pep, __pyx_v_senum, __pyx_v_rval1, __pyx_v_vecl, __pyx_v_vecr, __pyx_v_ival, __pyx_v_rval2)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 676, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":645
 *         return (scale, toReal(alpha), toInt(its), toReal(lbda))
 * 
 *     def setScale(self, scale, alpha=None, Vec Dl=None, Vec Dr=None, its=None, lbda=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the scaling strategy to be used for scaling the polynomial problem
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":678
 *         CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors object associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_62getBV[] = "PEP.getBV(self)\n\n        Obtain the basis vectors object associated to the eigensolver.\n\n        Returns\n        -------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBV (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_62getBV(struct PySlepcPEPObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getBV", 0);

  /* "SLEPc/PEP.pyx":687
 *             The basis vectors context.
 *         """
 *         cdef BV bv = BV()             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetBV(self.pep, &bv.bv) )
 *         PetscINCREF(bv.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":688
 *         """
 *         cdef BV bv = BV()
 *         CHKERR( PEPGetBV(self.pep, &bv.bv) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(bv.obj)
 *         return bv
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetBV(__pyx_v_self->pep, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 688, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":689
 *         cdef BV bv = BV()
 *         CHKERR( PEPGetBV(self.pep, &bv.bv) )
 *         PetscINCREF(bv.obj)             # <<<<<<<<<<<<<<
 *         return bv
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj);

  /* "SLEPc/PEP.pyx":690
 *         CHKERR( PEPGetBV(self.pep, &bv.bv) )
 *         PetscINCREF(bv.obj)
 *         return bv             # <<<<<<<<<<<<<<
 * 
 *     def setBV(self, BV bv not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bv));
  __pyx_r = ((PyObject *)__pyx_v_bv);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":678
 *         CHKERR( PEPSetScale(self.pep, senum, rval1, vecl, vecr, ival, rval2) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors object associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":692
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_64setBV[] = "PEP.setBV(self, BV bv)\n\n        Associates a basis vectors object to the eigensolver.\n\n        Parameters\n        ----------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(15, 692, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_bv = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 692, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(15, 692, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_bv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_64setBV(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setBV", 0);

  /* "SLEPc/PEP.pyx":701
 *             The basis vectors context.
 *         """
 *         CHKERR( PEPSetBV(self.pep, bv.bv) )             # <<<<<<<<<<<<<<
 * 
 *     def getRG(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetBV(__pyx_v_self->pep, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 701, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":692
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":703
 *         CHKERR( PEPSetBV(self.pep, bv.bv) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_66getRG[] = "PEP.getRG(self)\n\n        Obtain the region object associated to the eigensolver.\n\n        Returns\n        -------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRG (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_66getRG(struct PySlepcPEPObject *__pyx_v_self) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getRG", 0);

  /* "SLEPc/PEP.pyx":712
 *             The region context.
 *         """
 *         cdef RG rg = RG()             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetRG(self.pep, &rg.rg) )
 *         PetscINCREF(rg.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":713
 *         """
 *         cdef RG rg = RG()
 *         CHKERR( PEPGetRG(self.pep, &rg.rg) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(rg.obj)
 *         return rg
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetRG(__pyx_v_self->pep, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 713, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":714
 *         cdef RG rg = RG()
 *         CHKERR( PEPGetRG(self.pep, &rg.rg) )
 *         PetscINCREF(rg.obj)             # <<<<<<<<<<<<<<
 *         return rg
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj);

  /* "SLEPc/PEP.pyx":715
 *         CHKERR( PEPGetRG(self.pep, &rg.rg) )
 *         PetscINCREF(rg.obj)
 *         return rg             # <<<<<<<<<<<<<<
 * 
 *     def setRG(self, RG rg not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_rg));
  __pyx_r = ((PyObject *)__pyx_v_rg);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":703
 *         CHKERR( PEPSetBV(self.pep, bv.bv) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_rg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":717
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_68setRG[] = "PEP.setRG(self, RG rg)\n\n        Associates a region object to the eigensolver.\n\n        Parameters\n        ----------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRG (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(15, 717, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_rg = ((struct PySlepcRGObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 717, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(15, 717, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_rg);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_68setRG(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setRG", 0);

  /* "SLEPc/PEP.pyx":726
 *             The region context.
 *         """
 *         CHKERR( PEPSetRG(self.pep, rg.rg) )             # <<<<<<<<<<<<<<
 * 
 *     def getOperators(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetRG(__pyx_v_self->pep, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 726, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":717
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":728
 *         CHKERR( PEPSetRG(self.pep, rg.rg) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_70getOperators[] = "PEP.getOperators(self)\n\n        Gets the matrices associated with the eigenvalue problem.\n\n        Returns\n        -------\n        operators: tuple of Mat\n           The matrices associated with the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOperators (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOperators", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperators", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_70getOperators(struct PySlepcPEPObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  Mat __pyx_v_mat;
  PetscInt __pyx_v_k;
  PetscInt __pyx_v_n;
  PyObject *__pyx_v_operators = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("getOperators", 0);

  /* "SLEPc/PEP.pyx":738
 *         """
 *         cdef Mat A
 *         cdef PetscMat mat = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscInt k=0, n=0
 *         CHKERR( PEPGetNumMatrices(self.pep, &n) )
 */
  __pyx_v_mat = NULL;

  /* "SLEPc/PEP.pyx":739
 *         cdef Mat A
 *         cdef PetscMat mat = NULL
 *         cdef PetscInt k=0, n=0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetNumMatrices(self.pep, &n) )
 *         cdef object operators = []
 */
  __pyx_v_k = 0;
  __pyx_v_n = 0;

  /* "SLEPc/PEP.pyx":740
 *         cdef PetscMat mat = NULL
 *         cdef PetscInt k=0, n=0
 *         CHKERR( PEPGetNumMatrices(self.pep, &n) )             # <<<<<<<<<<<<<<
 *         cdef object operators = []
 *         for k from 0 <= k < n:
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetNumMatrices(__pyx_v_self->pep, (&__pyx_v_n))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 740, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":741
 *         cdef PetscInt k=0, n=0
 *         CHKERR( PEPGetNumMatrices(self.pep, &n) )
 *         cdef object operators = []             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < n:
 *             CHKERR( PEPGetOperators(self.pep, k, &mat) )
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_operators = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "SLEPc/PEP.pyx":742
 *         CHKERR( PEPGetNumMatrices(self.pep, &n) )
 *         cdef object operators = []
 *         for k from 0 <= k < n:             # <<<<<<<<<<<<<<
 *             CHKERR( PEPGetOperators(self.pep, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {

    /* "SLEPc/PEP.pyx":743
 *         cdef object operators = []
 *         for k from 0 <= k < n:
 *             CHKERR( PEPGetOperators(self.pep, k, &mat) )             # <<<<<<<<<<<<<<
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)
 */
    __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetOperators(__pyx_v_self->pep, __pyx_v_k, (&__pyx_v_mat))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 743, __pyx_L1_error)

    /* "SLEPc/PEP.pyx":744
 *         for k from 0 <= k < n:
 *             CHKERR( PEPGetOperators(self.pep, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *             operators.append(A)
 *         return tuple(operators)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_A, ((struct PyPetscMatObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_v_A->mat = __pyx_v_mat;
    __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

    /* "SLEPc/PEP.pyx":745
 *             CHKERR( PEPGetOperators(self.pep, k, &mat) )
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)             # <<<<<<<<<<<<<<
 *         return tuple(operators)
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_operators, ((PyObject *)__pyx_v_A)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 745, __pyx_L1_error)
  }

  /* "SLEPc/PEP.pyx":746
 *             A = Mat(); A.mat = mat; PetscINCREF(A.obj)
 *             operators.append(A)
 *         return tuple(operators)             # <<<<<<<<<<<<<<
 * 
 *     def setOperators(self, operators):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":728
 *         CHKERR( PEPSetRG(self.pep, rg.rg) )
 * 
 *     def getOperators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_operators);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":748
 *         return tuple(operators)
 * 
 *     def setOperators(self, operators):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_72setOperators[] = "PEP.setOperators(self, operators)\n\n        Sets the matrices associated with the eigenvalue problem.\n\n        Parameters\n        ----------\n        operators: sequence of Mat\n           The matrices associated with the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_operators = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOperators (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_operators,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_operators)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperators") < 0)) __PYX_ERR(15, 748, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_operators = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOperators", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 748, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_operators);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_72setOperators(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_operators) {
  Mat *__pyx_v_mats;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Mat __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setOperators", 0);
  __Pyx_INCREF(__pyx_v_operators);

  /* "SLEPc/PEP.pyx":757
 *            The matrices associated with the eigensystem.
 *         """
 *         operators = tuple(operators)             # <<<<<<<<<<<<<<
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)
 */
  __pyx_t_1 = PySequence_Tuple(__pyx_v_operators); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_operators, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":758
 *         """
 *         operators = tuple(operators)
 *         cdef PetscMat *mats = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 */
  __pyx_v_mats = NULL;

  /* "SLEPc/PEP.pyx":759
 *         operators = tuple(operators)
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 */
  __pyx_v_k = 0;
  __pyx_t_2 = PyObject_Length(__pyx_v_operators); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 759, __pyx_L1_error)
  __pyx_v_n = __pyx_t_2;

  /* "SLEPc/PEP.pyx":760
 *         cdef PetscMat *mats = NULL
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 *         CHKERR( PEPSetOperators(self.pep, <PetscInt>n, mats) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(Mat))), ((void **)(&__pyx_v_mats))); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_tmp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":761
 *         cdef Py_ssize_t k=0, n = len(operators)
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetOperators(self.pep, <PetscInt>n, mats) )
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_2; __pyx_v_k++) {
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_operators, __pyx_v_k, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(15, 761, __pyx_L1_error)
    __pyx_t_3 = ((struct PyPetscMatObject *)__pyx_t_1)->mat;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_mats[__pyx_v_k]) = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":762
 *         cdef tmp = allocate(<size_t>n*sizeof(PetscMat),<void**>&mats)
 *         for k from 0 <= k < n: mats[k] = (<Mat?>operators[k]).mat
 *         CHKERR( PEPSetOperators(self.pep, <PetscInt>n, mats) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetOperators(__pyx_v_self->pep, ((PetscInt)__pyx_v_n), __pyx_v_mats)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 762, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":748
 *         return tuple(operators)
 * 
 *     def setOperators(self, operators):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrices associated with the eigenvalue problem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setOperators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_operators);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":766
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_74setInitialSpace[] = "PEP.setInitialSpace(self, space)\n\n        Sets the initial space from which the eigensolver starts to\n        iterate.\n\n        Parameters\n        ----------\n        space: Vec or sequence of Vec\n           The initial space\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_space = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(15, 766, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_space = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 766, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_space);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_74setInitialSpace(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_space) {
  Vec *__pyx_v_vs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setInitialSpace", 0);
  __Pyx_INCREF(__pyx_v_space);

  /* "SLEPc/PEP.pyx":776
 *            The initial space
 *         """
 *         if isinstance(space, Vec): space = [space]             # <<<<<<<<<<<<<<
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_space);
    __Pyx_GIVEREF(__pyx_v_space);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space);
    __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/PEP.pyx":777
 *         """
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 */
  __pyx_v_vs = NULL;

  /* "SLEPc/PEP.pyx":778
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 778, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/PEP.pyx":779
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)             # <<<<<<<<<<<<<<
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( PEPSetInitialSpace(self.pep, <PetscInt>ns, vs) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/PEP.pyx":780
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec             # <<<<<<<<<<<<<<
 *         CHKERR( PEPSetInitialSpace(self.pep, <PetscInt>ns, vs) )
 * 
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(15, 780, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/PEP.pyx":781
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( PEPSetInitialSpace(self.pep, <PetscInt>ns, vs) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetInitialSpace(__pyx_v_self->pep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(15, 781, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":766
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_space);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":785
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a PEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_76cancelMonitor[] = "PEP.cancelMonitor(self)\n\n        Clears all monitors for a PEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_76cancelMonitor(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("cancelMonitor", 0);

  /* "SLEPc/PEP.pyx":789
 *         Clears all monitors for a PEP object.
 *         """
 *         CHKERR( PEPMonitorCancel(self.pep) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPMonitorCancel(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 789, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":785
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a PEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":793
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_78setUp[] = "PEP.setUp(self)\n\n        Sets up all the internal data structures necessary for the\n        execution of the eigensolver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_78setUp(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/PEP.pyx":798
 *         execution of the eigensolver.
 *         """
 *         CHKERR( PEPSetUp(self.pep) )             # <<<<<<<<<<<<<<
 * 
 *     def solve(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSetUp(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 798, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":793
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":800
 *         CHKERR( PEPSetUp(self.pep) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_80solve[] = "PEP.solve(self)\n\n        Solves the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_80solve(struct PySlepcPEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "SLEPc/PEP.pyx":804
 *         Solves the eigensystem.
 *         """
 *         CHKERR( PEPSolve(self.pep) )             # <<<<<<<<<<<<<<
 * 
 *     def getIterationNumber(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPSolve(__pyx_v_self->pep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 804, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":800
 *         CHKERR( PEPSetUp(self.pep) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":806
 *         CHKERR( PEPSolve(self.pep) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_82getIterationNumber[] = "PEP.getIterationNumber(self)\n\n        Gets the current iteration number. If the call to `solve()` is\n        complete, then it returns the number of iterations carried out\n        by the solution method.\n\n        Returns\n        -------\n        its: int\n             Iteration number.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_82getIterationNumber(struct PySlepcPEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getIterationNumber", 0);

  /* "SLEPc/PEP.pyx":817
 *              Iteration number.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetIterationNumber(self.pep, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/PEP.pyx":818
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( PEPGetIterationNumber(self.pep, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetIterationNumber(__pyx_v_self->pep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 818, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":819
 *         cdef PetscInt ival = 0
 *         CHKERR( PEPGetIterationNumber(self.pep, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getConvergedReason(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 819, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":806
 *         CHKERR( PEPSolve(self.pep) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":821
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_84getConvergedReason[] = "PEP.getConvergedReason(self)\n\n        Gets the reason why the `solve()` iteration was stopped.\n\n        Returns\n        -------\n        reason: `PEP.ConvergedReason` enumerate\n            Negative value indicates diverged, positive value\n            converged.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_84getConvergedReason(struct PySlepcPEPObject *__pyx_v_self) {
  PEPConvergedReason __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergedReason", 0);

  /* "SLEPc/PEP.pyx":831
 *             converged.
 *         """
 *         cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetConvergedReason(self.pep, &val) )
 *         return val
 */
  __pyx_v_val = PEP_CONVERGED_ITERATING;

  /* "SLEPc/PEP.pyx":832
 *         """
 *         cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING
 *         CHKERR( PEPGetConvergedReason(self.pep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConvergedReason(__pyx_v_self->pep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 832, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":833
 *         cdef SlepcPEPConvergedReason val = PEP_CONVERGED_ITERATING
 *         CHKERR( PEPGetConvergedReason(self.pep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PEPConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":821
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":836
 * 
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_86getConverged[] = "PEP.getConverged(self)\n\n        Gets the number of converged eigenpairs.\n\n        Returns\n        -------\n        nconv: int\n            Number of converged eigenpairs.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConverged (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_86getConverged(struct PySlepcPEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConverged", 0);

  /* "SLEPc/PEP.pyx":845
 *             Number of converged eigenpairs.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetConverged(self.pep, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/PEP.pyx":846
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( PEPGetConverged(self.pep, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetConverged(__pyx_v_self->pep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 846, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":847
 *         cdef PetscInt ival = 0
 *         CHKERR( PEPGetConverged(self.pep, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":836
 * 
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":849
 *         return toInt(ival)
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_88getEigenpair[] = "PEP.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n        Gets the i-th solution of the eigenproblem as computed by\n        `solve()`.  The solution consists of both the eigenvalue and\n        the eigenvector.\n\n        Parameters\n        ----------\n        i: int\n            Index of the solution to be obtained.\n        Vr: Vec, optional\n            Placeholder for the returned eigenvector (real part).\n        Vi: Vec, optional\n            Placeholder for the returned eigenvector (imaginary part).\n\n        Returns\n        -------\n        e: scalar (possibly complex)\n            The computed eigenvalue.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_Vr = 0;
  struct PyPetscVecObject *__pyx_v_Vi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[2] = (PyObject *)((struct PyPetscVecObject *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(15, 849, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 849, __pyx_L3_error)
    __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 849, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(15, 849, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(15, 849, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_88getEigenpair(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) {
  PetscScalar __pyx_v_sval1;
  PetscScalar __pyx_v_sval2;
  Vec __pyx_v_vecr;
  Vec __pyx_v_veci;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("getEigenpair", 0);

  /* "SLEPc/PEP.pyx":869
 *             The computed eigenvalue.
 *         """
 *         cdef PetscScalar sval1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 */
  __pyx_v_sval1 = 0.0;

  /* "SLEPc/PEP.pyx":870
 *         """
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 */
  __pyx_v_sval2 = 0.0;

  /* "SLEPc/PEP.pyx":871
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/PEP.pyx":872
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL             # <<<<<<<<<<<<<<
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 */
  __pyx_v_veci = NULL;

  /* "SLEPc/PEP.pyx":873
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec             # <<<<<<<<<<<<<<
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_Vr->vec;
    __pyx_v_vecr = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":874
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_Vi->vec;
    __pyx_v_veci = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":875
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) )             # <<<<<<<<<<<<<<
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetEigenpair(__pyx_v_self->pep, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 875, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":876
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( PEPGetEigenpair(self.pep, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))             # <<<<<<<<<<<<<<
 * 
 *     def getErrorEstimate(self, int i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(15, 876, __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 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(15, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":849
 *         return toInt(ival)
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":878
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_90getErrorEstimate[] = "PEP.getErrorEstimate(self, int i)\n\n        Returns the error estimate associated to the i-th computed\n        eigenpair.\n\n        Parameters\n        ----------\n        i: int\n            Index of the solution to be considered.\n\n        Returns\n        -------\n        error: real\n            Error estimate.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(15, 878, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 878, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 878, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_90getErrorEstimate(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i) {
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getErrorEstimate", 0);

  /* "SLEPc/PEP.pyx":893
 *             Error estimate.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) )
 *         return toReal(rval)
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/PEP.pyx":894
 *         """
 *         cdef PetscReal rval = 0
 *         CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPGetErrorEstimate(__pyx_v_self->pep, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 894, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":895
 *         cdef PetscReal rval = 0
 *         CHKERR( PEPGetErrorEstimate(self.pep, i, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def computeError(self, int i, etype=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":878
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":897
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_92computeError[] = "PEP.computeError(self, int i, etype=None)\n\n        Computes the error (based on the residual norm) associated with the i-th\n        computed eigenpair.\n\n        Parameters\n        ----------\n        i: int\n           Index of the solution to be considered.\n        etype: `PEP.ErrorType` enumerate\n           The error type to compute.\n\n        Returns\n        -------\n        error: real\n           The error bound, computed in various ways from the\n           residual norm ``||P(l)x||_2`` where ``l`` is the\n           eigenvalue and ``x`` is the eigenvector.\n\n        Notes\n        -----\n        The index ``i`` should be a value between ``0`` and\n        ``nconv-1`` (see `getConverged()`).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_v_etype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeError (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(15, 897, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(15, 897, __pyx_L3_error)
    __pyx_v_etype = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 897, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_92computeError(struct PySlepcPEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) {
  PEPErrorType __pyx_v_et;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PEPErrorType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("computeError", 0);

  /* "SLEPc/PEP.pyx":921
 *         ``nconv-1`` (see `getConverged()`).
 *         """
 *         cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 */
  __pyx_v_et = PEP_ERROR_BACKWARD;

  /* "SLEPc/PEP.pyx":922
 *         """
 *         cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         CHKERR( PEPComputeError(self.pep, i, et, &rval) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/PEP.pyx":923
 *         cdef SlepcPEPErrorType et = PEP_ERROR_BACKWARD
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         CHKERR( PEPComputeError(self.pep, i, et, &rval) )
 *         return toReal(rval)
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((PEPErrorType)__Pyx_PyInt_As_PEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 923, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":924
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 *         CHKERR( PEPComputeError(self.pep, i, et, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPComputeError(__pyx_v_self->pep, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(15, 924, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":925
 *         if etype is not None: et = etype
 *         CHKERR( PEPComputeError(self.pep, i, et, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":897
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":927
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_94errorView[] = "PEP.errorView(self, etype=None, Viewer viewer=None)\n\n        Displays the errors associated with the computed solution\n        (as well as the eigenvalues).\n\n        Parameters\n        ----------\n        etype: `PEP.ErrorType` enumerate, optional\n           The error type to compute.\n        viewer: Viewer, optional.\n                Visualization context; if not provided, the standard\n                output is used.\n\n        Notes\n        -----\n        By default, this function checks the error of all eigenpairs and prints\n        the eigenvalues if all of them are below the requested tolerance.\n        If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n        eigenvalues and corresponding errors is printed.\n\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_etype = 0;
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("errorView (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = (PyObject *)((struct PyPetscViewerObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(15, 927, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_etype = values[0];
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 927, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(15, 927, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_94errorView(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) {
  PEPErrorType __pyx_v_et;
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PEPErrorType __pyx_t_3;
  PetscViewer __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("errorView", 0);

  /* "SLEPc/PEP.pyx":948
 * 
 *         """
 *         cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 */
  __pyx_v_et = PEP_ERROR_RELATIVE;

  /* "SLEPc/PEP.pyx":949
 *         """
 *         cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((PEPErrorType)__Pyx_PyInt_As_PEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 949, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/PEP.pyx":950
 *         cdef SlepcPEPErrorType et = PEP_ERROR_RELATIVE
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( PEPErrorView(self.pep, et, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/PEP.pyx":951
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( PEPErrorView(self.pep, et, vwr) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_4;
  }

  /* "SLEPc/PEP.pyx":952
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( PEPErrorView(self.pep, et, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPErrorView(__pyx_v_self->pep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(15, 952, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":927
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":956
 *     #
 * 
 *     def setLinearEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_96setLinearEPS[] = "PEP.setLinearEPS(self, EPS eps)\n\n        Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.\n\n        Parameters\n        ----------\n        eps: EPS\n            The linear eigensolver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLinearEPS (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eps,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eps)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearEPS") < 0)) __PYX_ERR(15, 956, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_eps = ((struct PySlepcEPSObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLinearEPS", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 956, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eps), __pyx_ptype_8slepc4py_5SLEPc_EPS, 0, "eps", 0))) __PYX_ERR(15, 956, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_eps);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_96setLinearEPS(struct PySlepcPEPObject *__pyx_v_self, struct PySlepcEPSObject *__pyx_v_eps) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setLinearEPS", 0);

  /* "SLEPc/PEP.pyx":965
 *             The linear eigensolver.
 *         """
 *         CHKERR( PEPLinearSetEPS(self.pep, eps.eps) )             # <<<<<<<<<<<<<<
 * 
 *     def getLinearEPS(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetEPS(__pyx_v_self->pep, __pyx_v_eps->eps)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 965, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":956
 *     #
 * 
 *     def setLinearEPS(self, EPS eps not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associate an eigensolver object (EPS) to the polynomial eigenvalue solver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":967
 *         CHKERR( PEPLinearSetEPS(self.pep, eps.eps) )
 * 
 *     def getLinearEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (EPS) associated to the polynomial
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_98getLinearEPS[] = "PEP.getLinearEPS(self)\n\n        Retrieve the eigensolver object (EPS) associated to the polynomial\n        eigenvalue solver.\n \n        Returns\n        -------\n        eps: EPS\n            The linear eigensolver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLinearEPS (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getLinearEPS", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearEPS", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_98getLinearEPS(struct PySlepcPEPObject *__pyx_v_self) {
  struct PySlepcEPSObject *__pyx_v_eps = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getLinearEPS", 0);

  /* "SLEPc/PEP.pyx":977
 *             The linear eigensolver.
 *         """
 *         cdef EPS eps = EPS()             # <<<<<<<<<<<<<<
 *         CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) )
 *         PetscINCREF(eps.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_eps = ((struct PySlepcEPSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/PEP.pyx":978
 *         """
 *         cdef EPS eps = EPS()
 *         CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(eps.obj)
 *         return eps
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetEPS(__pyx_v_self->pep, (&__pyx_v_eps->eps))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 978, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":979
 *         cdef EPS eps = EPS()
 *         CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) )
 *         PetscINCREF(eps.obj)             # <<<<<<<<<<<<<<
 *         return eps
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_eps->__pyx_base.obj);

  /* "SLEPc/PEP.pyx":980
 *         CHKERR( PEPLinearGetEPS(self.pep, &eps.eps) )
 *         PetscINCREF(eps.obj)
 *         return eps             # <<<<<<<<<<<<<<
 * 
 *     def setLinearCompanionForm(self, cform not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_eps));
  __pyx_r = ((PyObject *)__pyx_v_eps);
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":967
 *         CHKERR( PEPLinearSetEPS(self.pep, eps.eps) )
 * 
 *     def getLinearEPS(self):             # <<<<<<<<<<<<<<
 *         """
 *         Retrieve the eigensolver object (EPS) associated to the polynomial
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearEPS", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_eps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":982
 *         return eps
 * 
 *     def setLinearCompanionForm(self, cform not None):             # <<<<<<<<<<<<<<
 *         """
 *         Choose between the two companion forms available for the linearization of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm[] = "PEP.setLinearCompanionForm(self, cform)\n\n        Choose between the two companion forms available for the linearization of\n        a quadratic eigenproblem.\n\n        Parameters\n        ----------\n        cform: integer\n            1 or 2 (first or second companion form).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_cform = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLinearCompanionForm (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cform,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cform)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearCompanionForm") < 0)) __PYX_ERR(15, 982, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_cform = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLinearCompanionForm", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 982, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_cform) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "cform"); __PYX_ERR(15, 982, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_cform);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_cform) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setLinearCompanionForm", 0);

  /* "SLEPc/PEP.pyx":992
 *             1 or 2 (first or second companion form).
 *         """
 *         CHKERR( PEPLinearSetCompanionForm(self.pep, cform) )             # <<<<<<<<<<<<<<
 * 
 *     def getLinearCompanionForm(self):
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_cform); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(15, 992, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetCompanionForm(__pyx_v_self->pep, __pyx_t_1)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 992, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":982
 *         return eps
 * 
 *     def setLinearCompanionForm(self, cform not None):             # <<<<<<<<<<<<<<
 *         """
 *         Choose between the two companion forms available for the linearization of
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":994
 *         CHKERR( PEPLinearSetCompanionForm(self.pep, cform) )
 * 
 *     def getLinearCompanionForm(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of the companion form that will be used for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm[] = "PEP.getLinearCompanionForm(self)\n\n        Returns the number of the companion form that will be used for the\n        linearization of a quadratic eigenproblem. \n \n        Returns\n        -------\n        cform: integer\n            1 or 2 (first or second companion form).\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLinearCompanionForm (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getLinearCompanionForm", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearCompanionForm", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm(struct PySlepcPEPObject *__pyx_v_self) {
  PetscInt __pyx_v_cform;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getLinearCompanionForm", 0);

  /* "SLEPc/PEP.pyx":1004
 *             1 or 2 (first or second companion form).
 *         """
 *         cdef PetscInt cform = 0             # <<<<<<<<<<<<<<
 *         CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) )
 *         return cform
 */
  __pyx_v_cform = 0;

  /* "SLEPc/PEP.pyx":1005
 *         """
 *         cdef PetscInt cform = 0
 *         CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) )             # <<<<<<<<<<<<<<
 *         return cform
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetCompanionForm(__pyx_v_self->pep, (&__pyx_v_cform))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 1005, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1006
 *         cdef PetscInt cform = 0
 *         CHKERR( PEPLinearGetCompanionForm(self.pep, &cform) )
 *         return cform             # <<<<<<<<<<<<<<
 * 
 *     def setLinearExplicitMatrix(self, flag not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_cform); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":994
 *         CHKERR( PEPLinearSetCompanionForm(self.pep, cform) )
 * 
 *     def getLinearCompanionForm(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of the companion form that will be used for the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearCompanionForm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":1008
 *         return cform
 * 
 *     def setLinearExplicitMatrix(self, flag not None):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the matrices A and B for the linearization of the problem
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix[] = "PEP.setLinearExplicitMatrix(self, flag)\n\n        Indicate if the matrices A and B for the linearization of the problem\n        must be built explicitly.\n\n        Parameters\n        ----------\n        flag: boolean\n            boolean flag indicating if the matrices are built explicitly .\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_flag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setLinearExplicitMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setLinearExplicitMatrix") < 0)) __PYX_ERR(15, 1008, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_flag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setLinearExplicitMatrix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(15, 1008, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(((PyObject *)__pyx_v_flag) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "flag"); __PYX_ERR(15, 1008, __pyx_L1_error)
  }
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self), __pyx_v_flag);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self, PyObject *__pyx_v_flag) {
  PetscBool __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setLinearExplicitMatrix", 0);

  /* "SLEPc/PEP.pyx":1018
 *             boolean flag indicating if the matrices are built explicitly .
 *         """
 *         cdef PetscBool sval = flag             # <<<<<<<<<<<<<<
 *         CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_flag)); if (unlikely(PyErr_Occurred())) __PYX_ERR(15, 1018, __pyx_L1_error)
  __pyx_v_sval = __pyx_t_1;

  /* "SLEPc/PEP.pyx":1019
 *         """
 *         cdef PetscBool sval = flag
 *         CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) )             # <<<<<<<<<<<<<<
 * 
 *     def getLinearExplicitMatrix(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearSetExplicitMatrix(__pyx_v_self->pep, __pyx_v_sval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(15, 1019, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1008
 *         return cform
 * 
 *     def setLinearExplicitMatrix(self, flag not None):             # <<<<<<<<<<<<<<
 *         """
 *         Indicate if the matrices A and B for the linearization of the problem
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.setLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/PEP.pyx":1021
 *         CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) )
 * 
 *     def getLinearExplicitMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating if the matrices A and B for the linearization
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix[] = "PEP.getLinearExplicitMatrix(self)\n\n        Returns the flag indicating if the matrices A and B for the linearization\n        are built explicitly.\n \n        Returns\n        -------\n        flag: boolean\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getLinearExplicitMatrix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getLinearExplicitMatrix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getLinearExplicitMatrix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(((struct PySlepcPEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix(struct PySlepcPEPObject *__pyx_v_self) {
  PetscBool __pyx_v_sval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getLinearExplicitMatrix", 0);

  /* "SLEPc/PEP.pyx":1030
 *         flag: boolean
 *         """
 *         cdef PetscBool sval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) )
 *         return sval
 */
  __pyx_v_sval = PETSC_FALSE;

  /* "SLEPc/PEP.pyx":1031
 *         """
 *         cdef PetscBool sval = PETSC_FALSE
 *         CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) )             # <<<<<<<<<<<<<<
 *         return sval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(PEPLinearGetExplicitMatrix(__pyx_v_self->pep, (&__pyx_v_sval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(15, 1031, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1032
 *         cdef PetscBool sval = PETSC_FALSE
 *         CHKERR( PEPLinearGetExplicitMatrix(self.pep, &sval) )
 *         return sval             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_sval); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/PEP.pyx":1021
 *         CHKERR( PEPLinearSetExplicitMatrix(self.pep, sval) )
 * 
 *     def getLinearExplicitMatrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating if the matrices A and B for the linearization
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.PEP.getLinearExplicitMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":96
 *     RefineScheme    = NEPRefineScheme
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.nep
 *         self.nep = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(((struct PySlepcNEPObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_3NEP___cinit__(struct PySlepcNEPObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/NEP.pyx":97
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.nep             # <<<<<<<<<<<<<<
 *         self.nep = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->nep));

  /* "SLEPc/NEP.pyx":98
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.nep
 *         self.nep = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->nep = NULL;

  /* "SLEPc/NEP.pyx":96
 *     RefineScheme    = NEPRefineScheme
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.nep
 *         self.nep = NULL
 */

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

/* "SLEPc/NEP.pyx":100
 *         self.nep = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the NEP data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_2view[] = "NEP.view(self, Viewer viewer=None)\n\n        Prints the NEP data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional.\n            Visualization context; if not provided, the standard\n            output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(16, 100, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 100, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(16, 100, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_2view(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_2view(struct PySlepcNEPObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/NEP.pyx":110
 *             output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( NEPView(self.nep, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/NEP.pyx":111
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( NEPView(self.nep, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":112
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( NEPView(self.nep, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPView(__pyx_v_self->nep, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 112, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":100
 *         self.nep = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the NEP data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":114
 *         CHKERR( NEPView(self.nep, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the NEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_4destroy[] = "NEP.destroy(self)\n\n        Destroys the NEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_4destroy(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/NEP.pyx":118
 *         Destroys the NEP object.
 *         """
 *         CHKERR( NEPDestroy(&self.nep) )             # <<<<<<<<<<<<<<
 *         self.nep = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPDestroy((&__pyx_v_self->nep))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 118, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":119
 *         """
 *         CHKERR( NEPDestroy(&self.nep) )
 *         self.nep = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->nep = NULL;

  /* "SLEPc/NEP.pyx":120
 *         CHKERR( NEPDestroy(&self.nep) )
 *         self.nep = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":114
 *         CHKERR( NEPView(self.nep, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the NEP object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":122
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the NEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_6reset[] = "NEP.reset(self)\n\n        Resets the NEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_6reset(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/NEP.pyx":126
 *         Resets the NEP object.
 *         """
 *         CHKERR( NEPReset(self.nep) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPReset(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 126, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":122
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the NEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":128
 *         CHKERR( NEPReset(self.nep) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the NEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_8create[] = "NEP.create(self, comm=None)\n\n        Creates the NEP object.\n\n        Parameters\n        ----------\n        comm: Comm, optional.\n            MPI communicator. If not provided, it defaults to all\n            processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(16, 128, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_8create(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_8create(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  NEP __pyx_v_newnep;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/NEP.pyx":138
 *             processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcNEP newnep = NULL
 *         CHKERR( NEPCreate(ccomm, &newnep) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 138, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/NEP.pyx":139
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcNEP newnep = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( NEPCreate(ccomm, &newnep) )
 *         SlepcCLEAR(self.obj); self.nep = newnep
 */
  __pyx_v_newnep = NULL;

  /* "SLEPc/NEP.pyx":140
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcNEP newnep = NULL
 *         CHKERR( NEPCreate(ccomm, &newnep) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.nep = newnep
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPCreate(__pyx_v_ccomm, (&__pyx_v_newnep))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 140, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":141
 *         cdef SlepcNEP newnep = NULL
 *         CHKERR( NEPCreate(ccomm, &newnep) )
 *         SlepcCLEAR(self.obj); self.nep = newnep             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->nep = __pyx_v_newnep;

  /* "SLEPc/NEP.pyx":142
 *         CHKERR( NEPCreate(ccomm, &newnep) )
 *         SlepcCLEAR(self.obj); self.nep = newnep
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, nep_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":128
 *         CHKERR( NEPReset(self.nep) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the NEP object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":144
 *         return self
 * 
 *     def setType(self, nep_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the NEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_10setType[] = "NEP.setType(self, nep_type)\n\n        Selects the particular solver to be used in the NEP object.\n\n        Parameters\n        ----------\n        nep_type: `NEP.Type` enumerate\n            The solver to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nep_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nep_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nep_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(16, 144, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_nep_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 144, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_nep_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_10setType(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nep_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_nep_type);

  /* "SLEPc/NEP.pyx":153
 *             The solver to be used.
 *         """
 *         cdef SlepcNEPType cval = NULL             # <<<<<<<<<<<<<<
 *         nep_type = str2bytes(nep_type, &cval)
 *         CHKERR( NEPSetType(self.nep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/NEP.pyx":154
 *         """
 *         cdef SlepcNEPType cval = NULL
 *         nep_type = str2bytes(nep_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetType(self.nep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_nep_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_nep_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/NEP.pyx":155
 *         cdef SlepcNEPType cval = NULL
 *         nep_type = str2bytes(nep_type, &cval)
 *         CHKERR( NEPSetType(self.nep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetType(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 155, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":144
 *         return self
 * 
 *     def setType(self, nep_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the NEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nep_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":157
 *         CHKERR( NEPSetType(self.nep, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the NEP type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_12getType[] = "NEP.getType(self)\n\n        Gets the NEP type of this object.\n\n        Returns\n        -------\n        type: `NEP.Type` enumerate\n            The solver currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_12getType(struct PySlepcNEPObject *__pyx_v_self) {
  const char* __pyx_v_nep_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/NEP.pyx":166
 *             The solver currently being used.
 *         """
 *         cdef SlepcNEPType nep_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetType(self.nep, &nep_type) )
 *         return bytes2str(nep_type)
 */
  __pyx_v_nep_type = NULL;

  /* "SLEPc/NEP.pyx":167
 *         """
 *         cdef SlepcNEPType nep_type = NULL
 *         CHKERR( NEPGetType(self.nep, &nep_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(nep_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetType(__pyx_v_self->nep, (&__pyx_v_nep_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 167, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":168
 *         cdef SlepcNEPType nep_type = NULL
 *         CHKERR( NEPGetType(self.nep, &nep_type) )
 *         return bytes2str(nep_type)             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_nep_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":157
 *         CHKERR( NEPSetType(self.nep, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the NEP type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":170
 *         return bytes2str(nep_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all NEP options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix[] = "NEP.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all NEP options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n            The prefix string set for this NEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/NEP.pyx":180
 *             The prefix string set for this NEP object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/NEP.pyx":181
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetOptionsPrefix(__pyx_v_self->nep, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 181, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":182
 *         cdef const_char *prefix = NULL
 *         CHKERR( NEPGetOptionsPrefix(self.nep, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":170
 *         return bytes2str(nep_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all NEP options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":184
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all NEP options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix[] = "NEP.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all NEP options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all NEP option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(16, 184, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 184, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/NEP.pyx":194
 *             The prefix string to prepend to all NEP option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( NEPSetOptionsPrefix(self.nep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/NEP.pyx":195
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetOptionsPrefix(self.nep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/NEP.pyx":196
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( NEPSetOptionsPrefix(self.nep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def appendOptionsPrefix(self, prefix):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetOptionsPrefix(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 196, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":184
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all NEP options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":198
 *         CHKERR( NEPSetOptionsPrefix(self.nep, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all NEP options
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix[] = "NEP.appendOptionsPrefix(self, prefix)\n\n        Appends to the prefix used for searching for all NEP options\n        in the database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all NEP option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(16, 198, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 198, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("appendOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/NEP.pyx":208
 *             The prefix string to prepend to all NEP option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( NEPAppendOptionsPrefix(self.nep, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/NEP.pyx":209
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( NEPAppendOptionsPrefix(self.nep, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/NEP.pyx":210
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( NEPAppendOptionsPrefix(self.nep, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPAppendOptionsPrefix(__pyx_v_self->nep, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 210, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":198
 *         CHKERR( NEPSetOptionsPrefix(self.nep, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all NEP options
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":212
 *         CHKERR( NEPAppendOptionsPrefix(self.nep, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets NEP options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_20setFromOptions[] = "NEP.setFromOptions(self)\n\n        Sets NEP options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_20setFromOptions(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/NEP.pyx":218
 *         the solver type.
 *         """
 *         CHKERR( NEPSetFromOptions(self.nep) )             # <<<<<<<<<<<<<<
 * 
 *     def getWhichEigenpairs(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetFromOptions(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 218, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":212
 *         CHKERR( NEPAppendOptionsPrefix(self.nep, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets NEP options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":220
 *         CHKERR( NEPSetFromOptions(self.nep) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs[] = "NEP.getWhichEigenpairs(self)\n\n        Returns which portion of the spectrum is to be sought.\n\n        Returns\n        -------\n        which: `NEP.Which` enumerate\n            The portion of the spectrum to be sought by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getWhichEigenpairs (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getWhichEigenpairs", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getWhichEigenpairs", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self) {
  NEPWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getWhichEigenpairs", 0);

  /* "SLEPc/NEP.pyx":229
 *             The portion of the spectrum to be sought by the solver.
 *         """
 *         cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetWhichEigenpairs(self.nep, &val) )
 *         return val
 */
  __pyx_v_val = NEP_LARGEST_MAGNITUDE;

  /* "SLEPc/NEP.pyx":230
 *         """
 *         cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE
 *         CHKERR( NEPGetWhichEigenpairs(self.nep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetWhichEigenpairs(__pyx_v_self->nep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 230, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":231
 *         cdef SlepcNEPWhich val = NEP_LARGEST_MAGNITUDE
 *         CHKERR( NEPGetWhichEigenpairs(self.nep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 *     def setWhichEigenpairs(self, which):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_NEPWhich(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":220
 *         CHKERR( NEPSetFromOptions(self.nep) )
 * 
 *     def getWhichEigenpairs(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":233
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs[] = "NEP.setWhichEigenpairs(self, which)\n\n        Specifies which portion of the spectrum is to be sought.\n\n        Parameters\n        ----------\n        which: `NEP.Which` enumerate\n            The portion of the spectrum to be sought by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_which = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setWhichEigenpairs (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_which,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_which)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setWhichEigenpairs") < 0)) __PYX_ERR(16, 233, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_which = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setWhichEigenpairs", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_which);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_which) {
  NEPWhich __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  NEPWhich __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setWhichEigenpairs", 0);

  /* "SLEPc/NEP.pyx":242
 *             The portion of the spectrum to be sought by the solver.
 *         """
 *         cdef SlepcNEPWhich val = which             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetWhichEigenpairs(self.nep, val) )
 * 
 */
  __pyx_t_1 = ((NEPWhich)__Pyx_PyInt_As_NEPWhich(__pyx_v_which)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 242, __pyx_L1_error)
  __pyx_v_val = __pyx_t_1;

  /* "SLEPc/NEP.pyx":243
 *         """
 *         cdef SlepcNEPWhich val = which
 *         CHKERR( NEPSetWhichEigenpairs(self.nep, val) )             # <<<<<<<<<<<<<<
 * 
 *     def getTolerances(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetWhichEigenpairs(__pyx_v_self->nep, __pyx_v_val)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 243, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":233
 *         return val
 * 
 *     def setWhichEigenpairs(self, which):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies which portion of the spectrum is to be sought.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setWhichEigenpairs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":245
 *         CHKERR( NEPSetWhichEigenpairs(self.nep, val) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_26getTolerances[] = "NEP.getTolerances(self)\n\n        Gets the tolerance and maximum iteration count used by the\n        default NEP convergence tests.\n\n        Returns\n        -------\n        tol: float\n            The convergence tolerance.\n        maxit: int\n            The maximum number of iterations.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_26getTolerances(struct PySlepcNEPObject *__pyx_v_self) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  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;
  __Pyx_RefNannySetupContext("getTolerances", 0);

  /* "SLEPc/NEP.pyx":257
 *             The maximum number of iterations.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = 0
 *         CHKERR( NEPGetTolerances(self.nep, &rval, &ival) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/NEP.pyx":258
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetTolerances(self.nep, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))
 */
  __pyx_v_ival = 0;

  /* "SLEPc/NEP.pyx":259
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0
 *         CHKERR( NEPGetTolerances(self.nep, &rval, &ival) )             # <<<<<<<<<<<<<<
 *         return (toReal(rval), toInt(ival))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetTolerances(__pyx_v_self->nep, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 259, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":260
 *         cdef PetscInt  ival = 0
 *         CHKERR( NEPGetTolerances(self.nep, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))             # <<<<<<<<<<<<<<
 * 
 *     def setTolerances(self, tol=None, maxit=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":245
 *         CHKERR( NEPSetWhichEigenpairs(self.nep, val) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":262
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, maxit=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used in convergence tests.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_28setTolerances[] = "NEP.setTolerances(self, tol=None, maxit=None)\n\n        Sets the tolerance and maximum iteration count used in convergence tests.\n\n        Parameters\n        ----------\n        tol: float, optional\n            The convergence tolerance.\n        maxit: int, optional\n            The maximum number of iterations.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_maxit = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_maxit,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maxit);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(16, 262, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tol = values[0];
    __pyx_v_maxit = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 262, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_maxit);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_28setTolerances(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_maxit) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscReal __pyx_t_3;
  PetscInt __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("setTolerances", 0);

  /* "SLEPc/NEP.pyx":273
 *             The maximum number of iterations.
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol   is not None: rval = asReal(tol)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/NEP.pyx":274
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if tol   is not None: rval = asReal(tol)
 *         if maxit is not None: ival = asInt(maxit)
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/NEP.pyx":275
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol   is not None: rval = asReal(tol)             # <<<<<<<<<<<<<<
 *         if maxit is not None: ival = asInt(maxit)
 *         CHKERR( NEPSetTolerances(self.nep, rval, ival) )
 */
  __pyx_t_1 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(16, 275, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":276
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol   is not None: rval = asReal(tol)
 *         if maxit is not None: ival = asInt(maxit)             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetTolerances(self.nep, rval, ival) )
 * 
 */
  __pyx_t_2 = (__pyx_v_maxit != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_maxit); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(16, 276, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/NEP.pyx":277
 *         if tol   is not None: rval = asReal(tol)
 *         if maxit is not None: ival = asInt(maxit)
 *         CHKERR( NEPSetTolerances(self.nep, rval, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getRIILagPreconditioner(self):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetTolerances(__pyx_v_self->nep, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(16, 277, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":262
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, maxit=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used in convergence tests.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":279
 *         CHKERR( NEPSetTolerances(self.nep, rval, ival) )
 * 
 *     def getRIILagPreconditioner(self):             # <<<<<<<<<<<<<<
 *         """
 *         Indicates how often the preconditioner is rebuilt.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner[] = "NEP.getRIILagPreconditioner(self)\n\n        Indicates how often the preconditioner is rebuilt.\n\n        Returns\n        -------\n        lag: int\n            The lag parameter.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRIILagPreconditioner (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRIILagPreconditioner", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRIILagPreconditioner", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getRIILagPreconditioner", 0);

  /* "SLEPc/NEP.pyx":288
 *             The lag parameter.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) )
 *         return ival
 */
  __pyx_v_ival = 0;

  /* "SLEPc/NEP.pyx":289
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) )             # <<<<<<<<<<<<<<
 *         return ival
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPRIIGetLagPreconditioner(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 289, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":290
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPRIIGetLagPreconditioner(self.nep, &ival) )
 *         return ival             # <<<<<<<<<<<<<<
 * 
 *     def setRIILagPreconditioner(self, lag):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":279
 *         CHKERR( NEPSetTolerances(self.nep, rval, ival) )
 * 
 *     def getRIILagPreconditioner(self):             # <<<<<<<<<<<<<<
 *         """
 *         Indicates how often the preconditioner is rebuilt.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":292
 *         return ival
 * 
 *     def setRIILagPreconditioner(self, lag):             # <<<<<<<<<<<<<<
 *         """
 *         Determines when the preconditioner is rebuilt in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner[] = "NEP.setRIILagPreconditioner(self, lag)\n\n        Determines when the preconditioner is rebuilt in the\n        nonlinear solve.\n\n        Parameters\n        ----------\n        lag: int\n            0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is\n            computed within the nonlinear iteration, 2 means every second time\n            the Jacobian is built, etc.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_lag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRIILagPreconditioner (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lag,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lag)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRIILagPreconditioner") < 0)) __PYX_ERR(16, 292, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_lag = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRIILagPreconditioner", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 292, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_lag);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_lag) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setRIILagPreconditioner", 0);

  /* "SLEPc/NEP.pyx":304
 *             the Jacobian is built, etc.
 *         """
 *         cdef PetscInt ival = lag             # <<<<<<<<<<<<<<
 *         CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) )
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_PetscInt(__pyx_v_lag); if (unlikely((__pyx_t_1 == (PetscInt)-1) && PyErr_Occurred())) __PYX_ERR(16, 304, __pyx_L1_error)
  __pyx_v_ival = __pyx_t_1;

  /* "SLEPc/NEP.pyx":305
 *         """
 *         cdef PetscInt ival = lag
 *         CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getTrackAll(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPRIISetLagPreconditioner(__pyx_v_self->nep, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 305, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":292
 *         return ival
 * 
 *     def setRIILagPreconditioner(self, lag):             # <<<<<<<<<<<<<<
 *         """
 *         Determines when the preconditioner is rebuilt in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRIILagPreconditioner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":307
 *         CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_34getTrackAll[] = "NEP.getTrackAll(self)\n\n        Returns the flag indicating whether all residual norms must be\n        computed or not.\n\n        Returns\n        -------\n        trackall: bool\n            Whether the solver compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackAll (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTrackAll", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTrackAll", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_34getTrackAll(struct PySlepcNEPObject *__pyx_v_self) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrackAll", 0);

  /* "SLEPc/NEP.pyx":317
 *             Whether the solver compute all residuals or not.
 *         """
 *         cdef PetscBool tval = PETSC_FALSE             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetTrackAll(self.nep, &tval) )
 *         return <bint>tval
 */
  __pyx_v_tval = PETSC_FALSE;

  /* "SLEPc/NEP.pyx":318
 *         """
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( NEPGetTrackAll(self.nep, &tval) )             # <<<<<<<<<<<<<<
 *         return <bint>tval
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetTrackAll(__pyx_v_self->nep, (&__pyx_v_tval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 318, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":319
 *         cdef PetscBool tval = PETSC_FALSE
 *         CHKERR( NEPGetTrackAll(self.nep, &tval) )
 *         return <bint>tval             # <<<<<<<<<<<<<<
 * 
 *     def setTrackAll(self, trackall):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_PetscBool(__pyx_v_tval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":307
 *         CHKERR( NEPRIISetLagPreconditioner(self.nep, ival) )
 * 
 *     def getTrackAll(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the flag indicating whether all residual norms must be
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":321
 *         return <bint>tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_36setTrackAll[] = "NEP.setTrackAll(self, trackall)\n\n        Specifies if the solver must compute the residual of all\n        approximate eigenpairs or not.\n\n        Parameters\n        ----------\n        trackall: bool\n            Whether compute all residuals or not.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_trackall = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrackAll (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_trackall,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trackall)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackAll") < 0)) __PYX_ERR(16, 321, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_trackall = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTrackAll", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_trackall);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_36setTrackAll(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_trackall) {
  PetscBool __pyx_v_tval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscBool __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setTrackAll", 0);

  /* "SLEPc/NEP.pyx":331
 *             Whether compute all residuals or not.
 *         """
 *         cdef PetscBool tval = trackall             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetTrackAll(self.nep, tval) )
 * 
 */
  __pyx_t_1 = ((PetscBool)__Pyx_PyInt_As_PetscBool(__pyx_v_trackall)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 331, __pyx_L1_error)
  __pyx_v_tval = __pyx_t_1;

  /* "SLEPc/NEP.pyx":332
 *         """
 *         cdef PetscBool tval = trackall
 *         CHKERR( NEPSetTrackAll(self.nep, tval) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetTrackAll(__pyx_v_self->nep, __pyx_v_tval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 332, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":321
 *         return <bint>tval
 * 
 *     def setTrackAll(self, trackall):             # <<<<<<<<<<<<<<
 *         """
 *         Specifies if the solver must compute the residual of all
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setTrackAll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":334
 *         CHKERR( NEPSetTrackAll(self.nep, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_38getDimensions[] = "NEP.getDimensions(self)\n\n        Gets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Returns\n        -------\n        nev: int\n            Number of eigenvalues to compute.\n        ncv: int\n            Maximum dimension of the subspace to be used by the solver.\n        mpd: int\n            Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_38getDimensions(struct PySlepcNEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  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;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/NEP.pyx":348
 *             Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 */
  __pyx_v_ival1 = 0;

  /* "SLEPc/NEP.pyx":349
 *         """
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = 0
 *         CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) )
 */
  __pyx_v_ival2 = 0;

  /* "SLEPc/NEP.pyx":350
 *         cdef PetscInt ival1 = 0
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 */
  __pyx_v_ival3 = 0;

  /* "SLEPc/NEP.pyx":351
 *         cdef PetscInt ival2 = 0
 *         cdef PetscInt ival3 = 0
 *         CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) )             # <<<<<<<<<<<<<<
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetDimensions(__pyx_v_self->nep, (&__pyx_v_ival1), (&__pyx_v_ival2), (&__pyx_v_ival3))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 351, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":352
 *         cdef PetscInt ival3 = 0
 *         CHKERR( NEPGetDimensions(self.nep, &ival1, &ival2, &ival3) )
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival3); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":334
 *         CHKERR( NEPSetTrackAll(self.nep, tval) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of eigenvalues to compute and the dimension of
 */

  /* 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_AddTraceback("slepc4py.SLEPc.NEP.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":354
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_40setDimensions[] = "NEP.setDimensions(self, nev=None, ncv=None, mpd=None)\n\n        Sets the number of eigenvalues to compute and the dimension of\n        the subspace.\n\n        Parameters\n        ----------\n        nev: int, optional\n            Number of eigenvalues to compute.\n        ncv: int, optional\n            Maximum dimension of the subspace to be used by the\n            solver.\n        mpd: int, optional\n            Maximum dimension allowed for the projected problem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_nev = 0;
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_v_mpd = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nev,&__pyx_n_s_ncv,&__pyx_n_s_mpd,0};
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nev);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mpd);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(16, 354, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_nev = values[0];
    __pyx_v_ncv = values[1];
    __pyx_v_mpd = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 354, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_nev, __pyx_v_ncv, __pyx_v_mpd);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_40setDimensions(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_nev, PyObject *__pyx_v_ncv, PyObject *__pyx_v_mpd) {
  PetscInt __pyx_v_ival1;
  PetscInt __pyx_v_ival2;
  PetscInt __pyx_v_ival3;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscInt __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/NEP.pyx":369
 *             Maximum dimension allowed for the projected problem.
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 */
  __pyx_v_ival1 = PETSC_DEFAULT;

  /* "SLEPc/NEP.pyx":370
 *         """
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 */
  __pyx_v_ival2 = PETSC_DEFAULT;

  /* "SLEPc/NEP.pyx":371
 *         cdef PetscInt ival1 = PETSC_DEFAULT
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 */
  __pyx_v_ival3 = PETSC_DEFAULT;

  /* "SLEPc/NEP.pyx":372
 *         cdef PetscInt ival2 = PETSC_DEFAULT
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)             # <<<<<<<<<<<<<<
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 */
  __pyx_t_1 = (__pyx_v_nev != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_nev); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 372, __pyx_L1_error)
    __pyx_v_ival1 = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":373
 *         cdef PetscInt ival3 = PETSC_DEFAULT
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)             # <<<<<<<<<<<<<<
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) )
 */
  __pyx_t_2 = (__pyx_v_ncv != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 373, __pyx_L1_error)
    __pyx_v_ival2 = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":374
 *         if nev is not None: ival1 = asInt(nev)
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) )
 * 
 */
  __pyx_t_1 = (__pyx_v_mpd != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_mpd); if (unlikely(__pyx_t_3 == -1L && PyErr_Occurred())) __PYX_ERR(16, 374, __pyx_L1_error)
    __pyx_v_ival3 = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":375
 *         if ncv is not None: ival2 = asInt(ncv)
 *         if mpd is not None: ival3 = asInt(mpd)
 *         CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) )             # <<<<<<<<<<<<<<
 * 
 *     def getBV(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetDimensions(__pyx_v_self->nep, __pyx_v_ival1, __pyx_v_ival2, __pyx_v_ival3)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 375, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":354
 *         return (toInt(ival1), toInt(ival2), toInt(ival3))
 * 
 *     def setDimensions(self, nev=None, ncv=None, mpd=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the number of eigenvalues to compute and the dimension of
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":377
 *         CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors object associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_42getBV[] = "NEP.getBV(self)\n\n        Obtain the basis vectors object associated to the eigensolver.\n\n        Returns\n        -------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBV (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_42getBV(struct PySlepcNEPObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getBV", 0);

  /* "SLEPc/NEP.pyx":386
 *             The basis vectors context.
 *         """
 *         cdef BV bv = BV()             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetBV(self.nep, &bv.bv) )
 *         PetscINCREF(bv.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/NEP.pyx":387
 *         """
 *         cdef BV bv = BV()
 *         CHKERR( NEPGetBV(self.nep, &bv.bv) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(bv.obj)
 *         return bv
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetBV(__pyx_v_self->nep, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 387, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":388
 *         cdef BV bv = BV()
 *         CHKERR( NEPGetBV(self.nep, &bv.bv) )
 *         PetscINCREF(bv.obj)             # <<<<<<<<<<<<<<
 *         return bv
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj);

  /* "SLEPc/NEP.pyx":389
 *         CHKERR( NEPGetBV(self.nep, &bv.bv) )
 *         PetscINCREF(bv.obj)
 *         return bv             # <<<<<<<<<<<<<<
 * 
 *     def setBV(self, BV bv not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bv));
  __pyx_r = ((PyObject *)__pyx_v_bv);
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":377
 *         CHKERR( NEPSetDimensions(self.nep, ival1, ival2, ival3) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vectors object associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":391
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_44setBV[] = "NEP.setBV(self, BV bv)\n\n        Associates a basis vectors object to the eigensolver.\n\n        Parameters\n        ----------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(16, 391, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_bv = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 391, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(16, 391, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_bv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_44setBV(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setBV", 0);

  /* "SLEPc/NEP.pyx":400
 *             The basis vectors context.
 *         """
 *         CHKERR( NEPSetBV(self.nep, bv.bv) )             # <<<<<<<<<<<<<<
 * 
 *     def getRG(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetBV(__pyx_v_self->nep, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 400, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":391
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vectors object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":402
 *         CHKERR( NEPSetBV(self.nep, bv.bv) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_46getRG[] = "NEP.getRG(self)\n\n        Obtain the region object associated to the eigensolver.\n\n        Returns\n        -------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRG (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getRG", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getRG", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_46getRG(struct PySlepcNEPObject *__pyx_v_self) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getRG", 0);

  /* "SLEPc/NEP.pyx":411
 *             The region context.
 *         """
 *         cdef RG rg = RG()             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetRG(self.nep, &rg.rg) )
 *         PetscINCREF(rg.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rg = ((struct PySlepcRGObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/NEP.pyx":412
 *         """
 *         cdef RG rg = RG()
 *         CHKERR( NEPGetRG(self.nep, &rg.rg) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(rg.obj)
 *         return rg
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetRG(__pyx_v_self->nep, (&__pyx_v_rg->rg))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(16, 412, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":413
 *         cdef RG rg = RG()
 *         CHKERR( NEPGetRG(self.nep, &rg.rg) )
 *         PetscINCREF(rg.obj)             # <<<<<<<<<<<<<<
 *         return rg
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_rg->__pyx_base.obj);

  /* "SLEPc/NEP.pyx":414
 *         CHKERR( NEPGetRG(self.nep, &rg.rg) )
 *         PetscINCREF(rg.obj)
 *         return rg             # <<<<<<<<<<<<<<
 * 
 *     def setRG(self, RG rg not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_rg));
  __pyx_r = ((PyObject *)__pyx_v_rg);
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":402
 *         CHKERR( NEPSetBV(self.nep, bv.bv) )
 * 
 *     def getRG(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the region object associated to the eigensolver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_rg);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":416
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_48setRG[] = "NEP.setRG(self, RG rg)\n\n        Associates a region object to the eigensolver.\n\n        Parameters\n        ----------\n        rg: RG\n            The region context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcRGObject *__pyx_v_rg = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRG (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rg,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rg)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRG") < 0)) __PYX_ERR(16, 416, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_rg = ((struct PySlepcRGObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRG", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 416, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rg), __pyx_ptype_8slepc4py_5SLEPc_RG, 0, "rg", 0))) __PYX_ERR(16, 416, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_rg);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_48setRG(struct PySlepcNEPObject *__pyx_v_self, struct PySlepcRGObject *__pyx_v_rg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setRG", 0);

  /* "SLEPc/NEP.pyx":425
 *             The region context.
 *         """
 *         CHKERR( NEPSetRG(self.nep, rg.rg) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetRG(__pyx_v_self->nep, __pyx_v_rg->rg)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 425, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":416
 *         return rg
 * 
 *     def setRG(self, RG rg not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a region object to the eigensolver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setRG", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":429
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_50setInitialSpace[] = "NEP.setInitialSpace(self, space)\n\n        Sets the initial space from which the eigensolver starts to\n        iterate.\n\n        Parameters\n        ----------\n        space: Vec or sequence of Vec\n           The initial space\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_space = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setInitialSpace (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_space,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_space)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setInitialSpace") < 0)) __PYX_ERR(16, 429, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_space = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setInitialSpace", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 429, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_space);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_50setInitialSpace(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_space) {
  Vec *__pyx_v_vs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_ns;
  CYTHON_UNUSED PyObject *__pyx_v_tmp = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Vec __pyx_t_6;
  int __pyx_t_7;
  __Pyx_RefNannySetupContext("setInitialSpace", 0);
  __Pyx_INCREF(__pyx_v_space);

  /* "SLEPc/NEP.pyx":439
 *            The initial space
 *         """
 *         if isinstance(space, Vec): space = [space]             # <<<<<<<<<<<<<<
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_space, __pyx_ptype_8petsc4py_5PETSc_Vec); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_space);
    __Pyx_GIVEREF(__pyx_v_space);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_space);
    __Pyx_DECREF_SET(__pyx_v_space, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/NEP.pyx":440
 *         """
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 */
  __pyx_v_vs = NULL;

  /* "SLEPc/NEP.pyx":441
 *         if isinstance(space, Vec): space = [space]
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)             # <<<<<<<<<<<<<<
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_space); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 441, __pyx_L1_error)
  __pyx_v_ns = __pyx_t_4;

  /* "SLEPc/NEP.pyx":442
 *         cdef PetscVec *vs = NULL
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)             # <<<<<<<<<<<<<<
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( NEPSetInitialSpace(self.nep, <PetscInt>ns, vs) )
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_ns) * (sizeof(struct PyPetscVecObject))), ((void **)(&__pyx_v_vs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/NEP.pyx":443
 *         cdef Py_ssize_t i = 0, ns = len(space)
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetInitialSpace(self.nep, <PetscInt>ns, vs) )
 * 
 */
  __pyx_t_4 = __pyx_v_ns;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_space, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Vec)))) __PYX_ERR(16, 443, __pyx_L1_error)
    __pyx_t_6 = ((struct PyPetscVecObject *)__pyx_t_3)->vec;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_vs[__pyx_v_i]) = __pyx_t_6;
  }

  /* "SLEPc/NEP.pyx":444
 *         cdef tmp = allocate(<size_t>ns*sizeof(Vec),<void**>&vs)
 *         for i in range(ns): vs[i] = (<Vec?>space[i]).vec
 *         CHKERR( NEPSetInitialSpace(self.nep, <PetscInt>ns, vs) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_7 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetInitialSpace(__pyx_v_self->nep, ((PetscInt)__pyx_v_ns), __pyx_v_vs)); if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(16, 444, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":429
 *     #
 * 
 *     def setInitialSpace(self, space):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the initial space from which the eigensolver starts to
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setInitialSpace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp);
  __Pyx_XDECREF(__pyx_v_space);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":448
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a NEP object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_52cancelMonitor[] = "NEP.cancelMonitor(self)\n\n        Clears all monitors for a NEP object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_52cancelMonitor(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("cancelMonitor", 0);

  /* "SLEPc/NEP.pyx":452
 *         Clears all monitors for a NEP object.
 *         """
 *         CHKERR( NEPMonitorCancel(self.nep) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPMonitorCancel(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 452, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":448
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a NEP object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":456
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_54setUp[] = "NEP.setUp(self)\n\n        Sets up all the internal data structures necessary for the\n        execution of the eigensolver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_54setUp(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/NEP.pyx":461
 *         execution of the eigensolver.
 *         """
 *         CHKERR( NEPSetUp(self.nep) )             # <<<<<<<<<<<<<<
 * 
 *     def solve(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetUp(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 461, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":456
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":463
 *         CHKERR( NEPSetUp(self.nep) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_56solve[] = "NEP.solve(self)\n\n        Solves the eigensystem.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("solve", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "solve", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_56solve(struct PySlepcNEPObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "SLEPc/NEP.pyx":467
 *         Solves the eigensystem.
 *         """
 *         CHKERR( NEPSolve(self.nep) )             # <<<<<<<<<<<<<<
 * 
 *     def getIterationNumber(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSolve(__pyx_v_self->nep)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 467, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":463
 *         CHKERR( NEPSetUp(self.nep) )
 * 
 *     def solve(self):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the eigensystem.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":469
 *         CHKERR( NEPSolve(self.nep) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_58getIterationNumber[] = "NEP.getIterationNumber(self)\n\n        Gets the current iteration number. If the call to `solve()` is\n        complete, then it returns the number of iterations carried out\n        by the solution method.\n\n        Returns\n        -------\n        its: int\n             Iteration number.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_58getIterationNumber(struct PySlepcNEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getIterationNumber", 0);

  /* "SLEPc/NEP.pyx":480
 *              Iteration number.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetIterationNumber(self.nep, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/NEP.pyx":481
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPGetIterationNumber(self.nep, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetIterationNumber(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 481, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":482
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPGetIterationNumber(self.nep, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getConvergedReason(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":469
 *         CHKERR( NEPSolve(self.nep) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":484
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_60getConvergedReason[] = "NEP.getConvergedReason(self)\n\n        Gets the reason why the `solve()` iteration was stopped.\n\n        Returns\n        -------\n        reason: `NEP.ConvergedReason` enumerate\n            Negative value indicates diverged, positive value\n            converged.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_60getConvergedReason(struct PySlepcNEPObject *__pyx_v_self) {
  NEPConvergedReason __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergedReason", 0);

  /* "SLEPc/NEP.pyx":494
 *             converged.
 *         """
 *         cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetConvergedReason(self.nep, &val) )
 *         return val
 */
  __pyx_v_val = NEP_CONVERGED_ITERATING;

  /* "SLEPc/NEP.pyx":495
 *         """
 *         cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING
 *         CHKERR( NEPGetConvergedReason(self.nep, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetConvergedReason(__pyx_v_self->nep, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 495, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":496
 *         cdef SlepcNEPConvergedReason val = NEP_CONVERGED_ITERATING
 *         CHKERR( NEPGetConvergedReason(self.nep, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_NEPConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":484
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":499
 * 
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_62getConverged[] = "NEP.getConverged(self)\n\n        Gets the number of converged eigenpairs.\n\n        Returns\n        -------\n        nconv: int\n            Number of converged eigenpairs.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConverged (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConverged", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConverged", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(((struct PySlepcNEPObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_62getConverged(struct PySlepcNEPObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConverged", 0);

  /* "SLEPc/NEP.pyx":508
 *             Number of converged eigenpairs.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetConverged(self.nep, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/NEP.pyx":509
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPGetConverged(self.nep, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetConverged(__pyx_v_self->nep, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 509, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":510
 *         cdef PetscInt ival = 0
 *         CHKERR( NEPGetConverged(self.nep, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":499
 * 
 * 
 *     def getConverged(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the number of converged eigenpairs.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getConverged", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":512
 *         return toInt(ival)
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_64getEigenpair[] = "NEP.getEigenpair(self, int i, Vec Vr=None, Vec Vi=None)\n\n        Gets the i-th solution of the eigenproblem as computed by\n        `solve()`.  The solution consists of both the eigenvalue and\n        the eigenvector.\n\n        Parameters\n        ----------\n        i: int\n            Index of the solution to be obtained.\n        Vr: Vec, optional\n            Placeholder for the returned eigenvector (real part).\n        Vi: Vec, optional\n            Placeholder for the returned eigenvector (imaginary part).\n\n        Returns\n        -------\n        e: scalar (possibly complex)\n            The computed eigenvalue.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  struct PyPetscVecObject *__pyx_v_Vr = 0;
  struct PyPetscVecObject *__pyx_v_Vi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEigenpair (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_Vr,&__pyx_n_s_Vi,0};
    PyObject* values[3] = {0,0,0};
    values[1] = (PyObject *)((struct PyPetscVecObject *)Py_None);
    values[2] = (PyObject *)((struct PyPetscVecObject *)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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vr);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_Vi);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEigenpair") < 0)) __PYX_ERR(16, 512, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 512, __pyx_L3_error)
    __pyx_v_Vr = ((struct PyPetscVecObject *)values[1]);
    __pyx_v_Vi = ((struct PyPetscVecObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEigenpair", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 512, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vr), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vr", 0))) __PYX_ERR(16, 512, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Vi), __pyx_ptype_8petsc4py_5PETSc_Vec, 1, "Vi", 0))) __PYX_ERR(16, 512, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_Vr, __pyx_v_Vi);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_64getEigenpair(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, struct PyPetscVecObject *__pyx_v_Vr, struct PyPetscVecObject *__pyx_v_Vi) {
  PetscScalar __pyx_v_sval1;
  PetscScalar __pyx_v_sval2;
  Vec __pyx_v_vecr;
  Vec __pyx_v_veci;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Vec __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("getEigenpair", 0);

  /* "SLEPc/NEP.pyx":532
 *             The computed eigenvalue.
 *         """
 *         cdef PetscScalar sval1 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 */
  __pyx_v_sval1 = 0.0;

  /* "SLEPc/NEP.pyx":533
 *         """
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0             # <<<<<<<<<<<<<<
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 */
  __pyx_v_sval2 = 0.0;

  /* "SLEPc/NEP.pyx":534
 *         cdef PetscScalar sval1 = 0
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL             # <<<<<<<<<<<<<<
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 */
  __pyx_v_vecr = NULL;

  /* "SLEPc/NEP.pyx":535
 *         cdef PetscScalar sval2 = 0
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL             # <<<<<<<<<<<<<<
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 */
  __pyx_v_veci = NULL;

  /* "SLEPc/NEP.pyx":536
 *         cdef PetscVec vecr = NULL
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec             # <<<<<<<<<<<<<<
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) )
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_Vr) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_Vr->vec;
    __pyx_v_vecr = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":537
 *         cdef PetscVec veci = NULL
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_Vi) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_Vi->vec;
    __pyx_v_veci = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":538
 *         if Vr is not None: vecr = Vr.vec
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) )             # <<<<<<<<<<<<<<
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetEigenpair(__pyx_v_self->nep, __pyx_v_i, (&__pyx_v_sval1), (&__pyx_v_sval2), __pyx_v_vecr, __pyx_v_veci)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 538, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":539
 *         if Vi is not None: veci = Vi.vec
 *         CHKERR( NEPGetEigenpair(self.nep, i, &sval1, &sval2, vecr, veci) )
 *         return complex(toScalar(sval1), toScalar(sval2))             # <<<<<<<<<<<<<<
 * 
 *     def getErrorEstimate(self, int i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_8slepc4py_5SLEPc_toScalar(__pyx_v_sval2); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(16, 539, __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 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":512
 *         return toInt(ival)
 * 
 *     def getEigenpair(self, int i, Vec Vr=None, Vec Vi=None):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the i-th solution of the eigenproblem as computed by
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getEigenpair", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":541
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_66getErrorEstimate[] = "NEP.getErrorEstimate(self, int i)\n\n        Returns the error estimate associated to the i-th computed\n        eigenpair.\n\n        Parameters\n        ----------\n        i: int\n            Index of the solution to be considered.\n\n        Returns\n        -------\n        error: real\n            Error estimate.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getErrorEstimate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getErrorEstimate") < 0)) __PYX_ERR(16, 541, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 541, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getErrorEstimate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 541, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_66getErrorEstimate(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i) {
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getErrorEstimate", 0);

  /* "SLEPc/NEP.pyx":556
 *             Error estimate.
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) )
 *         return toReal(rval)
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/NEP.pyx":557
 *         """
 *         cdef PetscReal rval = 0
 *         CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPGetErrorEstimate(__pyx_v_self->nep, __pyx_v_i, (&__pyx_v_rval))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(16, 557, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":558
 *         cdef PetscReal rval = 0
 *         CHKERR( NEPGetErrorEstimate(self.nep, i, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def computeError(self, int i, etype=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":541
 *         return complex(toScalar(sval1), toScalar(sval2))
 * 
 *     def getErrorEstimate(self, int i):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the error estimate associated to the i-th computed
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.getErrorEstimate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":560
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_68computeError[] = "NEP.computeError(self, int i, etype=None)\n\n        Computes the error (based on the residual norm) associated with the i-th\n        computed eigenpair.\n\n        Parameters\n        ----------\n        i: int\n            Index of the solution to be considered.\n        etype: `NEP.ErrorType` enumerate\n            The error type to compute.\n\n        Returns\n        -------\n        error: real\n            The error bound, computed in various ways from the residual norm\n            ``||T(lambda)x||_2`` where ``lambda`` is the eigenvalue and\n            ``x`` is the eigenvector.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  PyObject *__pyx_v_etype = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("computeError (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_etype,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "computeError") < 0)) __PYX_ERR(16, 560, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 560, __pyx_L3_error)
    __pyx_v_etype = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("computeError", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 560, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_i, __pyx_v_etype);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_68computeError(struct PySlepcNEPObject *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_etype) {
  NEPErrorType __pyx_v_et;
  PetscReal __pyx_v_rval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  NEPErrorType __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("computeError", 0);

  /* "SLEPc/NEP.pyx":579
 *             ``x`` is the eigenvector.
 *         """
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 */
  __pyx_v_et = NEP_ERROR_RELATIVE;

  /* "SLEPc/NEP.pyx":580
 *         """
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         CHKERR( NEPComputeError(self.nep, i, et, &rval) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/NEP.pyx":581
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         CHKERR( NEPComputeError(self.nep, i, et, &rval) )
 *         return toReal(rval)
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((NEPErrorType)__Pyx_PyInt_As_NEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 581, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":582
 *         cdef PetscReal rval = 0
 *         if etype is not None: et = etype
 *         CHKERR( NEPComputeError(self.nep, i, et, &rval) )             # <<<<<<<<<<<<<<
 *         return toReal(rval)
 * 
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPComputeError(__pyx_v_self->nep, __pyx_v_i, __pyx_v_et, (&__pyx_v_rval))); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 582, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":583
 *         if etype is not None: et = etype
 *         CHKERR( NEPComputeError(self.nep, i, et, &rval) )
 *         return toReal(rval)             # <<<<<<<<<<<<<<
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "SLEPc/NEP.pyx":560
 *         return toReal(rval)
 * 
 *     def computeError(self, int i, etype=None):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the error (based on the residual norm) associated with the i-th
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.computeError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":585
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_70errorView[] = "NEP.errorView(self, etype=None, Viewer viewer=None)\n\n        Displays the errors associated with the computed solution\n        (as well as the eigenvalues).\n\n        Parameters\n        ----------\n        etype: `NEP.ErrorType` enumerate, optional\n           The error type to compute.\n        viewer: Viewer, optional.\n                Visualization context; if not provided, the standard\n                output is used.\n\n        Notes\n        -----\n        By default, this function checks the error of all eigenpairs and prints\n        the eigenvalues if all of them are below the requested tolerance.\n        If the viewer has format ``ASCII_INFO_DETAIL`` then a table with\n        eigenvalues and corresponding errors is printed.\n\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_etype = 0;
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("errorView (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_viewer,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = (PyObject *)((struct PyPetscViewerObject *)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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "errorView") < 0)) __PYX_ERR(16, 585, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_etype = values[0];
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("errorView", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 585, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(16, 585, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_etype, __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_70errorView(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_etype, struct PyPetscViewerObject *__pyx_v_viewer) {
  NEPErrorType __pyx_v_et;
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  NEPErrorType __pyx_t_3;
  PetscViewer __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("errorView", 0);

  /* "SLEPc/NEP.pyx":606
 * 
 *         """
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 */
  __pyx_v_et = NEP_ERROR_RELATIVE;

  /* "SLEPc/NEP.pyx":607
 *         """
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE
 *         if etype is not None: et = etype             # <<<<<<<<<<<<<<
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 */
  __pyx_t_1 = (__pyx_v_etype != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = ((NEPErrorType)__Pyx_PyInt_As_NEPErrorType(__pyx_v_etype)); if (unlikely(PyErr_Occurred())) __PYX_ERR(16, 607, __pyx_L1_error)
    __pyx_v_et = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":608
 *         cdef SlepcNEPErrorType et = NEP_ERROR_RELATIVE
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( NEPErrorView(self.nep, et, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/NEP.pyx":609
 *         if etype is not None: et = etype
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( NEPErrorView(self.nep, et, vwr) )
 * 
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_4;
  }

  /* "SLEPc/NEP.pyx":610
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( NEPErrorView(self.nep, et, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPErrorView(__pyx_v_self->nep, __pyx_v_et, __pyx_v_vwr)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(16, 610, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":585
 *         return toReal(rval)
 * 
 *     def errorView(self, etype=None, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Displays the errors associated with the computed solution
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.errorView", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":612
 *         CHKERR( NEPErrorView(self.nep, et, vwr) )
 * 
 *     def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the function to compute the nonlinear Function T(lambda)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_72setFunction[] = "NEP.setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None)\n\n        Sets the function to compute the nonlinear Function T(lambda)\n        as well as the location to store the matrix.\n\n        Parameters\n        ----------\n        function:\n            Function evaluation routine\n        F: Mat\n            Function matrix\n        P: Mat\n            preconditioner matrix (usually same as the Function)\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_function = 0;
  struct PyPetscMatObject *__pyx_v_F = 0;
  struct PyPetscMatObject *__pyx_v_P = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFunction (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function,&__pyx_n_s_F,&__pyx_n_s_P,&__pyx_n_s_args,&__pyx_n_s_kargs,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[2] = (PyObject *)((struct PyPetscMatObject *)Py_None);
    values[3] = ((PyObject *)Py_None);
    values[4] = ((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  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_F)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setFunction", 0, 2, 5, 1); __PYX_ERR(16, 612, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_P);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kargs);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFunction") < 0)) __PYX_ERR(16, 612, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_function = values[0];
    __pyx_v_F = ((struct PyPetscMatObject *)values[1]);
    __pyx_v_P = ((struct PyPetscMatObject *)values[2]);
    __pyx_v_args = values[3];
    __pyx_v_kargs = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFunction", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 612, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_F), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "F", 0))) __PYX_ERR(16, 612, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_P), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "P", 0))) __PYX_ERR(16, 612, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_function, __pyx_v_F, __pyx_v_P, __pyx_v_args, __pyx_v_kargs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_72setFunction(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_function, struct PyPetscMatObject *__pyx_v_F, struct PyPetscMatObject *__pyx_v_P, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) {
  Mat __pyx_v_Fmat;
  Mat __pyx_v_Pmat;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Mat __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("setFunction", 0);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_INCREF(__pyx_v_kargs);

  /* "SLEPc/NEP.pyx":626
 *             preconditioner matrix (usually same as the Function)
 *         """
 *         cdef PetscMat Fmat=NULL             # <<<<<<<<<<<<<<
 *         if F is not None: Fmat = F.mat
 *         cdef PetscMat Pmat=Fmat
 */
  __pyx_v_Fmat = NULL;

  /* "SLEPc/NEP.pyx":627
 *         """
 *         cdef PetscMat Fmat=NULL
 *         if F is not None: Fmat = F.mat             # <<<<<<<<<<<<<<
 *         cdef PetscMat Pmat=Fmat
 *         if P is not None: Pmat = P.mat
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_F) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_F->mat;
    __pyx_v_Fmat = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":628
 *         cdef PetscMat Fmat=NULL
 *         if F is not None: Fmat = F.mat
 *         cdef PetscMat Pmat=Fmat             # <<<<<<<<<<<<<<
 *         if P is not None: Pmat = P.mat
 *         CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) )
 */
  __pyx_v_Pmat = __pyx_v_Fmat;

  /* "SLEPc/NEP.pyx":629
 *         if F is not None: Fmat = F.mat
 *         cdef PetscMat Pmat=Fmat
 *         if P is not None: Pmat = P.mat             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) )
 *         if args is None: args = ()
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_P) != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = __pyx_v_P->mat;
    __pyx_v_Pmat = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":630
 *         cdef PetscMat Pmat=Fmat
 *         if P is not None: Pmat = P.mat
 *         CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) )             # <<<<<<<<<<<<<<
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetFunction(__pyx_v_self->nep, __pyx_v_Fmat, __pyx_v_Pmat, __pyx_f_8slepc4py_5SLEPc_NEP_Function, NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 630, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":631
 *         if P is not None: Pmat = P.mat
 *         CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) )
 *         if args is None: args = ()             # <<<<<<<<<<<<<<
 *         if kargs is None: kargs = {}
 *         self.set_attr('__function__', (function, args, kargs))
 */
  __pyx_t_1 = (__pyx_v_args == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_empty_tuple);
    __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple);
  }

  /* "SLEPc/NEP.pyx":632
 *         CHKERR( NEPSetFunction(self.nep, Fmat, Pmat, NEP_Function, NULL) )
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}             # <<<<<<<<<<<<<<
 *         self.set_attr('__function__', (function, args, kargs))
 * 
 */
  __pyx_t_2 = (__pyx_v_kargs == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5);
    __pyx_t_5 = 0;
  }

  /* "SLEPc/NEP.pyx":633
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}
 *         self.set_attr('__function__', (function, args, kargs))             # <<<<<<<<<<<<<<
 * 
 *     def setJacobian(self, jacobian, Mat J, args=None, kargs=None):
 */
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_function);
  __Pyx_GIVEREF(__pyx_v_function);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_function);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_args);
  __Pyx_INCREF(__pyx_v_kargs);
  __Pyx_GIVEREF(__pyx_v_kargs);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_kargs);
  __pyx_t_6 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__function__"), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "SLEPc/NEP.pyx":612
 *         CHKERR( NEPErrorView(self.nep, et, vwr) )
 * 
 *     def setFunction(self, function, Mat F, Mat P=None, args=None, kargs=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the function to compute the nonlinear Function T(lambda)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":635
 *         self.set_attr('__function__', (function, args, kargs))
 * 
 *     def setJacobian(self, jacobian, Mat J, args=None, kargs=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the function to compute Jacobian T'(lambda) as well
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_74setJacobian[] = "NEP.setJacobian(self, jacobian, Mat J, args=None, kargs=None)\n\n        Sets the function to compute Jacobian T'(lambda) as well\n        as the location to store the matrix.\n\n        Parameters\n        ----------\n        jacobian:\n            Jacobian evaluation routine\n        J: Mat\n            Jacobian matrix\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_jacobian = 0;
  struct PyPetscMatObject *__pyx_v_J = 0;
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setJacobian (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_jacobian,&__pyx_n_s_J,&__pyx_n_s_args,&__pyx_n_s_kargs,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)Py_None);
    values[3] = ((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  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jacobian)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_J)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setJacobian", 0, 2, 4, 1); __PYX_ERR(16, 635, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kargs);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setJacobian") < 0)) __PYX_ERR(16, 635, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_jacobian = values[0];
    __pyx_v_J = ((struct PyPetscMatObject *)values[1]);
    __pyx_v_args = values[2];
    __pyx_v_kargs = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setJacobian", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 635, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_J), __pyx_ptype_8petsc4py_5PETSc_Mat, 1, "J", 0))) __PYX_ERR(16, 635, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_jacobian, __pyx_v_J, __pyx_v_args, __pyx_v_kargs);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_74setJacobian(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_jacobian, struct PyPetscMatObject *__pyx_v_J, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) {
  Mat __pyx_v_Jmat;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Mat __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("setJacobian", 0);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_INCREF(__pyx_v_kargs);

  /* "SLEPc/NEP.pyx":647
 *             Jacobian matrix
 *         """
 *         cdef PetscMat Jmat=NULL             # <<<<<<<<<<<<<<
 *         if J is not None: Jmat = J.mat
 *         CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) )
 */
  __pyx_v_Jmat = NULL;

  /* "SLEPc/NEP.pyx":648
 *         """
 *         cdef PetscMat Jmat=NULL
 *         if J is not None: Jmat = J.mat             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) )
 *         if args is None: args = ()
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_J) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_J->mat;
    __pyx_v_Jmat = __pyx_t_3;
  }

  /* "SLEPc/NEP.pyx":649
 *         cdef PetscMat Jmat=NULL
 *         if J is not None: Jmat = J.mat
 *         CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) )             # <<<<<<<<<<<<<<
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetJacobian(__pyx_v_self->nep, __pyx_v_Jmat, __pyx_f_8slepc4py_5SLEPc_NEP_Jacobian, NULL)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 649, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":650
 *         if J is not None: Jmat = J.mat
 *         CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) )
 *         if args is None: args = ()             # <<<<<<<<<<<<<<
 *         if kargs is None: kargs = {}
 *         self.set_attr('__jacobian__', (jacobian, args, kargs))
 */
  __pyx_t_2 = (__pyx_v_args == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __Pyx_INCREF(__pyx_empty_tuple);
    __Pyx_DECREF_SET(__pyx_v_args, __pyx_empty_tuple);
  }

  /* "SLEPc/NEP.pyx":651
 *         CHKERR( NEPSetJacobian(self.nep, Jmat, NEP_Jacobian, NULL) )
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}             # <<<<<<<<<<<<<<
 *         self.set_attr('__jacobian__', (jacobian, args, kargs))
 * 
 */
  __pyx_t_1 = (__pyx_v_kargs == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 651, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_kargs, __pyx_t_5);
    __pyx_t_5 = 0;
  }

  /* "SLEPc/NEP.pyx":652
 *         if args is None: args = ()
 *         if kargs is None: kargs = {}
 *         self.set_attr('__jacobian__', (jacobian, args, kargs))             # <<<<<<<<<<<<<<
 * 
 *     def setSplitOperator(self, A, f, structure=None):
 */
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_jacobian);
  __Pyx_GIVEREF(__pyx_v_jacobian);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_jacobian);
  __Pyx_INCREF(__pyx_v_args);
  __Pyx_GIVEREF(__pyx_v_args);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_args);
  __Pyx_INCREF(__pyx_v_kargs);
  __Pyx_GIVEREF(__pyx_v_kargs);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_kargs);
  __pyx_t_6 = ((struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.set_attr(((struct PyPetscObjectObject *)__pyx_v_self), ((char *)"__jacobian__"), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(16, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "SLEPc/NEP.pyx":635
 *         self.set_attr('__function__', (function, args, kargs))
 * 
 *     def setJacobian(self, jacobian, Mat J, args=None, kargs=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the function to compute Jacobian T'(lambda) as well
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setJacobian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/NEP.pyx":654
 *         self.set_attr('__jacobian__', (jacobian, args, kargs))
 * 
 *     def setSplitOperator(self, A, f, structure=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the operator of the nonlinear eigenvalue problem
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3NEP_76setSplitOperator[] = "NEP.setSplitOperator(self, A, f, structure=None)\n\n        Sets the operator of the nonlinear eigenvalue problem\n        in split form.\n\n        Parameters\n        ----------\n        A: Mat or sequence of Mat\n            Coefficient matrices of the split form.\n        f: sequence of FN\n            Scalar functions of the split form.\n        structure: `PETSc.Mat.Structure` enumerate, optional\n            Structure flag for matrices.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_A = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_structure = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setSplitOperator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,&__pyx_n_s_f,&__pyx_n_s_structure,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((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);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setSplitOperator", 0, 2, 3, 1); __PYX_ERR(16, 654, __pyx_L3_error)
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_structure);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setSplitOperator") < 0)) __PYX_ERR(16, 654, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        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_A = values[0];
    __pyx_v_f = values[1];
    __pyx_v_structure = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setSplitOperator", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 654, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setSplitOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(((struct PySlepcNEPObject *)__pyx_v_self), __pyx_v_A, __pyx_v_f, __pyx_v_structure);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3NEP_76setSplitOperator(struct PySlepcNEPObject *__pyx_v_self, PyObject *__pyx_v_A, PyObject *__pyx_v_f, PyObject *__pyx_v_structure) {
  Mat *__pyx_v_As;
  FN *__pyx_v_Fs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  MatStructure __pyx_v_mstr;
  CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0;
  CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  MatStructure __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Mat __pyx_t_7;
  FN __pyx_t_8;
  int __pyx_t_9;
  __Pyx_RefNannySetupContext("setSplitOperator", 0);
  __Pyx_INCREF(__pyx_v_A);
  __Pyx_INCREF(__pyx_v_f);

  /* "SLEPc/NEP.pyx":668
 *             Structure flag for matrices.
 *         """
 *         if isinstance(A, Mat): A = [A]             # <<<<<<<<<<<<<<
 *         if isinstance(f, FN):  f = [f]
 *         cdef PetscMat *As = NULL
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_A, __pyx_ptype_8petsc4py_5PETSc_Mat); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_A);
    __Pyx_GIVEREF(__pyx_v_A);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_A);
    __Pyx_DECREF_SET(__pyx_v_A, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/NEP.pyx":669
 *         """
 *         if isinstance(A, Mat): A = [A]
 *         if isinstance(f, FN):  f = [f]             # <<<<<<<<<<<<<<
 *         cdef PetscMat *As = NULL
 *         cdef SlepcFN  *Fs = NULL
 */
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_f, __pyx_ptype_8slepc4py_5SLEPc_FN); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_f);
    __Pyx_GIVEREF(__pyx_v_f);
    PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_f);
    __Pyx_DECREF_SET(__pyx_v_f, __pyx_t_3);
    __pyx_t_3 = 0;
  }

  /* "SLEPc/NEP.pyx":670
 *         if isinstance(A, Mat): A = [A]
 *         if isinstance(f, FN):  f = [f]
 *         cdef PetscMat *As = NULL             # <<<<<<<<<<<<<<
 *         cdef SlepcFN  *Fs = NULL
 *         cdef Py_ssize_t i = 0, n = len(A)
 */
  __pyx_v_As = NULL;

  /* "SLEPc/NEP.pyx":671
 *         if isinstance(f, FN):  f = [f]
 *         cdef PetscMat *As = NULL
 *         cdef SlepcFN  *Fs = NULL             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i = 0, n = len(A)
 *         cdef PetscMatStructure mstr = matstructure(structure)
 */
  __pyx_v_Fs = NULL;

  /* "SLEPc/NEP.pyx":672
 *         cdef PetscMat *As = NULL
 *         cdef SlepcFN  *Fs = NULL
 *         cdef Py_ssize_t i = 0, n = len(A)             # <<<<<<<<<<<<<<
 *         cdef PetscMatStructure mstr = matstructure(structure)
 *         assert n == len(f)
 */
  __pyx_v_i = 0;
  __pyx_t_4 = PyObject_Length(__pyx_v_A); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 672, __pyx_L1_error)
  __pyx_v_n = __pyx_t_4;

  /* "SLEPc/NEP.pyx":673
 *         cdef SlepcFN  *Fs = NULL
 *         cdef Py_ssize_t i = 0, n = len(A)
 *         cdef PetscMatStructure mstr = matstructure(structure)             # <<<<<<<<<<<<<<
 *         assert n == len(f)
 *         cdef tmp1 = allocate(<size_t>n*sizeof(Mat),<void**>&As)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_matstructure(__pyx_v_structure); if (unlikely(__pyx_t_5 == ((MatStructure)-1L))) __PYX_ERR(16, 673, __pyx_L1_error)
  __pyx_v_mstr = __pyx_t_5;

  /* "SLEPc/NEP.pyx":674
 *         cdef Py_ssize_t i = 0, n = len(A)
 *         cdef PetscMatStructure mstr = matstructure(structure)
 *         assert n == len(f)             # <<<<<<<<<<<<<<
 *         cdef tmp1 = allocate(<size_t>n*sizeof(Mat),<void**>&As)
 *         cdef tmp2 = allocate(<size_t>n*sizeof(FN),<void**>&Fs)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_4 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(16, 674, __pyx_L1_error)
    if (unlikely(!((__pyx_v_n == __pyx_t_4) != 0))) {
      PyErr_SetNone(PyExc_AssertionError);
      __PYX_ERR(16, 674, __pyx_L1_error)
    }
  }
  #endif

  /* "SLEPc/NEP.pyx":675
 *         cdef PetscMatStructure mstr = matstructure(structure)
 *         assert n == len(f)
 *         cdef tmp1 = allocate(<size_t>n*sizeof(Mat),<void**>&As)             # <<<<<<<<<<<<<<
 *         cdef tmp2 = allocate(<size_t>n*sizeof(FN),<void**>&Fs)
 *         for i in range(n):
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(struct PyPetscMatObject))), ((void **)(&__pyx_v_As))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp1 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/NEP.pyx":676
 *         assert n == len(f)
 *         cdef tmp1 = allocate(<size_t>n*sizeof(Mat),<void**>&As)
 *         cdef tmp2 = allocate(<size_t>n*sizeof(FN),<void**>&Fs)             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             As[i] = (<Mat?>A[i]).mat
 */
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_allocate((((size_t)__pyx_v_n) * (sizeof(struct PySlepcFNObject))), ((void **)(&__pyx_v_Fs))); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_tmp2 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "SLEPc/NEP.pyx":677
 *         cdef tmp1 = allocate(<size_t>n*sizeof(Mat),<void**>&As)
 *         cdef tmp2 = allocate(<size_t>n*sizeof(FN),<void**>&Fs)
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             As[i] = (<Mat?>A[i]).mat
 *             Fs[i] = (<FN?>f[i]).fn
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "SLEPc/NEP.pyx":678
 *         cdef tmp2 = allocate(<size_t>n*sizeof(FN),<void**>&Fs)
 *         for i in range(n):
 *             As[i] = (<Mat?>A[i]).mat             # <<<<<<<<<<<<<<
 *             Fs[i] = (<FN?>f[i]).fn
 *         CHKERR( NEPSetSplitOperator(self.nep, <PetscInt>n, As, Fs, mstr) )
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_A, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8petsc4py_5PETSc_Mat)))) __PYX_ERR(16, 678, __pyx_L1_error)
    __pyx_t_7 = ((struct PyPetscMatObject *)__pyx_t_3)->mat;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_As[__pyx_v_i]) = __pyx_t_7;

    /* "SLEPc/NEP.pyx":679
 *         for i in range(n):
 *             As[i] = (<Mat?>A[i]).mat
 *             Fs[i] = (<FN?>f[i]).fn             # <<<<<<<<<<<<<<
 *         CHKERR( NEPSetSplitOperator(self.nep, <PetscInt>n, As, Fs, mstr) )
 * 
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_8slepc4py_5SLEPc_FN)))) __PYX_ERR(16, 679, __pyx_L1_error)
    __pyx_t_8 = ((struct PySlepcFNObject *)__pyx_t_3)->fn;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_Fs[__pyx_v_i]) = __pyx_t_8;
  }

  /* "SLEPc/NEP.pyx":680
 *             As[i] = (<Mat?>A[i]).mat
 *             Fs[i] = (<FN?>f[i]).fn
 *         CHKERR( NEPSetSplitOperator(self.nep, <PetscInt>n, As, Fs, mstr) )             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_9 = __pyx_f_8slepc4py_5SLEPc_CHKERR(NEPSetSplitOperator(__pyx_v_self->nep, ((PetscInt)__pyx_v_n), __pyx_v_As, __pyx_v_Fs, __pyx_v_mstr)); if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(16, 680, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":654
 *         self.set_attr('__jacobian__', (jacobian, args, kargs))
 * 
 *     def setSplitOperator(self, A, f, structure=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the operator of the nonlinear eigenvalue problem
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("slepc4py.SLEPc.NEP.setSplitOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tmp1);
  __Pyx_XDECREF(__pyx_v_tmp2);
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":34
 *     ConvergedReason = MFNConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.mfn
 *         self.mfn = NULL
 */

/* Python wrapper */
static int __pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(((struct PySlepcMFNObject *)__pyx_v_self));

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

static int __pyx_pf_8slepc4py_5SLEPc_3MFN___cinit__(struct PySlepcMFNObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "SLEPc/MFN.pyx":35
 * 
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.mfn             # <<<<<<<<<<<<<<
 *         self.mfn = NULL
 * 
 */
  __pyx_v_self->__pyx_base.obj = ((PetscObject *)(&__pyx_v_self->mfn));

  /* "SLEPc/MFN.pyx":36
 *     def __cinit__(self):
 *         self.obj = <PetscObject*> &self.mfn
 *         self.mfn = NULL             # <<<<<<<<<<<<<<
 * 
 *     def view(self, Viewer viewer=None):
 */
  __pyx_v_self->mfn = NULL;

  /* "SLEPc/MFN.pyx":34
 *     ConvergedReason = MFNConvergedReason
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.obj = <PetscObject*> &self.mfn
 *         self.mfn = NULL
 */

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

/* "SLEPc/MFN.pyx":38
 *         self.mfn = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the MFN data structure.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_2view[] = "MFN.view(self, Viewer viewer=None)\n\n        Prints the MFN data structure.\n\n        Parameters\n        ----------\n        viewer: Viewer, optional.\n            Visualization context; if not provided, the standard\n            output is used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_3view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscViewerObject *__pyx_v_viewer = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("view (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_viewer,0};
    PyObject* values[1] = {0};
    values[0] = (PyObject *)((struct PyPetscViewerObject *)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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewer);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "view") < 0)) __PYX_ERR(17, 38, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_viewer = ((struct PyPetscViewerObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 38, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewer), __pyx_ptype_8petsc4py_5PETSc_Viewer, 1, "viewer", 0))) __PYX_ERR(17, 38, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_2view(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_viewer);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_2view(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscViewerObject *__pyx_v_viewer) {
  PetscViewer __pyx_v_vwr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscViewer __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("view", 0);

  /* "SLEPc/MFN.pyx":48
 *             output is used.
 *         """
 *         cdef PetscViewer vwr = NULL             # <<<<<<<<<<<<<<
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( MFNView(self.mfn, vwr) )
 */
  __pyx_v_vwr = NULL;

  /* "SLEPc/MFN.pyx":49
 *         """
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr             # <<<<<<<<<<<<<<
 *         CHKERR( MFNView(self.mfn, vwr) )
 * 
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_viewer) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_v_viewer->vwr;
    __pyx_v_vwr = __pyx_t_3;
  }

  /* "SLEPc/MFN.pyx":50
 *         cdef PetscViewer vwr = NULL
 *         if viewer is not None: vwr = viewer.vwr
 *         CHKERR( MFNView(self.mfn, vwr) )             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNView(__pyx_v_self->mfn, __pyx_v_vwr)); if (unlikely(__pyx_t_4 == -1)) __PYX_ERR(17, 50, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":38
 *         self.mfn = NULL
 * 
 *     def view(self, Viewer viewer=None):             # <<<<<<<<<<<<<<
 *         """
 *         Prints the MFN data structure.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":52
 *         CHKERR( MFNView(self.mfn, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_4destroy[] = "MFN.destroy(self)\n\n        Destroys the MFN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("destroy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "destroy", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_4destroy(struct PySlepcMFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "SLEPc/MFN.pyx":56
 *         Destroys the MFN object.
 *         """
 *         CHKERR( MFNDestroy(&self.mfn) )             # <<<<<<<<<<<<<<
 *         self.mfn = NULL
 *         return self
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNDestroy((&__pyx_v_self->mfn))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 56, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":57
 *         """
 *         CHKERR( MFNDestroy(&self.mfn) )
 *         self.mfn = NULL             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_v_self->mfn = NULL;

  /* "SLEPc/MFN.pyx":58
 *         CHKERR( MFNDestroy(&self.mfn) )
 *         self.mfn = NULL
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":52
 *         CHKERR( MFNView(self.mfn, vwr) )
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Destroys the MFN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":60
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_6reset[] = "MFN.reset(self)\n\n        Resets the MFN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_6reset(struct PySlepcMFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("reset", 0);

  /* "SLEPc/MFN.pyx":64
 *         Resets the MFN object.
 *         """
 *         CHKERR( MFNReset(self.mfn) )             # <<<<<<<<<<<<<<
 * 
 *     def create(self, comm=None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNReset(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 64, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":60
 *         return self
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         """
 *         Resets the MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":66
 *         CHKERR( MFNReset(self.mfn) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_8create[] = "MFN.create(self, comm=None)\n\n        Creates the MFN object.\n\n        Parameters\n        ----------\n        comm: Comm, optional.\n            MPI communicator. If not provided, it defaults to all\n            processes.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_9create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_comm = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_comm);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create") < 0)) __PYX_ERR(17, 66, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_comm = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 66, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_8create(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_comm);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_8create(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_comm) {
  MPI_Comm __pyx_v_ccomm;
  MFN __pyx_v_newmfn;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  MPI_Comm __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("create", 0);

  /* "SLEPc/MFN.pyx":76
 *             processes.
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())             # <<<<<<<<<<<<<<
 *         cdef SlepcMFN newmfn = NULL
 *         CHKERR( MFNCreate(ccomm, &newmfn) )
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_def_Comm(__pyx_v_comm, __pyx_f_8slepc4py_5SLEPc_SLEPC_COMM_DEFAULT()); if (unlikely(PyErr_Occurred())) __PYX_ERR(17, 76, __pyx_L1_error)
  __pyx_v_ccomm = __pyx_t_1;

  /* "SLEPc/MFN.pyx":77
 *         """
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcMFN newmfn = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( MFNCreate(ccomm, &newmfn) )
 *         SlepcCLEAR(self.obj); self.mfn = newmfn
 */
  __pyx_v_newmfn = NULL;

  /* "SLEPc/MFN.pyx":78
 *         cdef MPI_Comm ccomm = def_Comm(comm, SLEPC_COMM_DEFAULT())
 *         cdef SlepcMFN newmfn = NULL
 *         CHKERR( MFNCreate(ccomm, &newmfn) )             # <<<<<<<<<<<<<<
 *         SlepcCLEAR(self.obj); self.mfn = newmfn
 *         return self
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNCreate(__pyx_v_ccomm, (&__pyx_v_newmfn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 78, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":79
 *         cdef SlepcMFN newmfn = NULL
 *         CHKERR( MFNCreate(ccomm, &newmfn) )
 *         SlepcCLEAR(self.obj); self.mfn = newmfn             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_SlepcCLEAR(__pyx_v_self->__pyx_base.obj);
  __pyx_v_self->mfn = __pyx_v_newmfn;

  /* "SLEPc/MFN.pyx":80
 *         CHKERR( MFNCreate(ccomm, &newmfn) )
 *         SlepcCLEAR(self.obj); self.mfn = newmfn
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def setType(self, mfn_type):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":66
 *         CHKERR( MFNReset(self.mfn) )
 * 
 *     def create(self, comm=None):             # <<<<<<<<<<<<<<
 *         """
 *         Creates the MFN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":82
 *         return self
 * 
 *     def setType(self, mfn_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_10setType[] = "MFN.setType(self, mfn_type)\n\n        Selects the particular solver to be used in the MFN object.\n\n        Parameters\n        ----------\n        mfn_type: `MFN.Type` enumerate\n            The solver to be used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mfn_type = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mfn_type,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mfn_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setType") < 0)) __PYX_ERR(17, 82, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_mfn_type = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setType", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 82, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_mfn_type);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_10setType(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_mfn_type) {
  const char* __pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setType", 0);
  __Pyx_INCREF(__pyx_v_mfn_type);

  /* "SLEPc/MFN.pyx":91
 *             The solver to be used.
 *         """
 *         cdef SlepcMFNType cval = NULL             # <<<<<<<<<<<<<<
 *         mfn_type = str2bytes(mfn_type, &cval)
 *         CHKERR( MFNSetType(self.mfn, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/MFN.pyx":92
 *         """
 *         cdef SlepcMFNType cval = NULL
 *         mfn_type = str2bytes(mfn_type, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( MFNSetType(self.mfn, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_mfn_type, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_mfn_type, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":93
 *         cdef SlepcMFNType cval = NULL
 *         mfn_type = str2bytes(mfn_type, &cval)
 *         CHKERR( MFNSetType(self.mfn, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def getType(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetType(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 93, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":82
 *         return self
 * 
 *     def setType(self, mfn_type):             # <<<<<<<<<<<<<<
 *         """
 *         Selects the particular solver to be used in the MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_mfn_type);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":95
 *         CHKERR( MFNSetType(self.mfn, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the MFN type of this object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_12getType[] = "MFN.getType(self)\n\n        Gets the MFN type of this object.\n\n        Returns\n        -------\n        type: `MFN.Type` enumerate\n            The solver currently being used.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getType (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getType", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getType", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_12getType(struct PySlepcMFNObject *__pyx_v_self) {
  const char* __pyx_v_mfn_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getType", 0);

  /* "SLEPc/MFN.pyx":104
 *             The solver currently being used.
 *         """
 *         cdef SlepcMFNType mfn_type = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetType(self.mfn, &mfn_type) )
 *         return bytes2str(mfn_type)
 */
  __pyx_v_mfn_type = NULL;

  /* "SLEPc/MFN.pyx":105
 *         """
 *         cdef SlepcMFNType mfn_type = NULL
 *         CHKERR( MFNGetType(self.mfn, &mfn_type) )             # <<<<<<<<<<<<<<
 *         return bytes2str(mfn_type)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetType(__pyx_v_self->mfn, (&__pyx_v_mfn_type))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 105, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":106
 *         cdef SlepcMFNType mfn_type = NULL
 *         CHKERR( MFNGetType(self.mfn, &mfn_type) )
 *         return bytes2str(mfn_type)             # <<<<<<<<<<<<<<
 * 
 *     def getOptionsPrefix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_mfn_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":95
 *         CHKERR( MFNSetType(self.mfn, cval) )
 * 
 *     def getType(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the MFN type of this object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":108
 *         return bytes2str(mfn_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all MFN options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix[] = "MFN.getOptionsPrefix(self)\n\n        Gets the prefix used for searching for all MFN options in the\n        database.\n\n        Returns\n        -------\n        prefix: string\n            The prefix string set for this MFN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOptionsPrefix (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOptionsPrefix", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOptionsPrefix", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self) {
  const char *__pyx_v_prefix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getOptionsPrefix", 0);

  /* "SLEPc/MFN.pyx":118
 *             The prefix string set for this MFN object.
 *         """
 *         cdef const_char *prefix = NULL             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) )
 *         return bytes2str(prefix)
 */
  __pyx_v_prefix = NULL;

  /* "SLEPc/MFN.pyx":119
 *         """
 *         cdef const_char *prefix = NULL
 *         CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) )             # <<<<<<<<<<<<<<
 *         return bytes2str(prefix)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetOptionsPrefix(__pyx_v_self->mfn, (&__pyx_v_prefix))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 119, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":120
 *         cdef const_char *prefix = NULL
 *         CHKERR( MFNGetOptionsPrefix(self.mfn, &prefix) )
 *         return bytes2str(prefix)             # <<<<<<<<<<<<<<
 * 
 *     def setOptionsPrefix(self, prefix):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_bytes2str(__pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":108
 *         return bytes2str(mfn_type)
 * 
 *     def getOptionsPrefix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the prefix used for searching for all MFN options in the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":122
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all MFN options in the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix[] = "MFN.setOptionsPrefix(self, prefix)\n\n        Sets the prefix used for searching for all MFN options in the\n        database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all MFN option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOptionsPrefix") < 0)) __PYX_ERR(17, 122, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 122, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/MFN.pyx":132
 *             The prefix string to prepend to all MFN option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( MFNSetOptionsPrefix(self.mfn, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/MFN.pyx":133
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( MFNSetOptionsPrefix(self.mfn, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":134
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( MFNSetOptionsPrefix(self.mfn, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def appendOptionsPrefix(self, prefix):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetOptionsPrefix(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 134, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":122
 *         return bytes2str(prefix)
 * 
 *     def setOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the prefix used for searching for all MFN options in the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":136
 *         CHKERR( MFNSetOptionsPrefix(self.mfn, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all MFN options
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix[] = "MFN.appendOptionsPrefix(self, prefix)\n\n        Appends to the prefix used for searching for all MFN options\n        in the database.\n\n        Parameters\n        ----------\n        prefix: string\n            The prefix string to prepend to all MFN option requests.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("appendOptionsPrefix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_prefix,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "appendOptionsPrefix") < 0)) __PYX_ERR(17, 136, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_prefix = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("appendOptionsPrefix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 136, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_prefix);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_prefix) {
  const char *__pyx_v_cval;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("appendOptionsPrefix", 0);
  __Pyx_INCREF(__pyx_v_prefix);

  /* "SLEPc/MFN.pyx":146
 *             The prefix string to prepend to all MFN option requests.
 *         """
 *         cdef const_char *cval = NULL             # <<<<<<<<<<<<<<
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) )
 */
  __pyx_v_cval = NULL;

  /* "SLEPc/MFN.pyx":147
 *         """
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)             # <<<<<<<<<<<<<<
 *         CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_str2bytes(__pyx_v_prefix, (&__pyx_v_cval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":148
 *         cdef const_char *cval = NULL
 *         prefix = str2bytes(prefix, &cval)
 *         CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) )             # <<<<<<<<<<<<<<
 * 
 *     def setFromOptions(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNAppendOptionsPrefix(__pyx_v_self->mfn, __pyx_v_cval)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 148, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":136
 *         CHKERR( MFNSetOptionsPrefix(self.mfn, cval) )
 * 
 *     def appendOptionsPrefix(self, prefix):             # <<<<<<<<<<<<<<
 *         """
 *         Appends to the prefix used for searching for all MFN options
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.appendOptionsPrefix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":150
 *         CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets MFN options from the options database. This routine must
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_20setFromOptions[] = "MFN.setFromOptions(self)\n\n        Sets MFN options from the options database. This routine must\n        be called before `setUp()` if the user is to be allowed to set\n        the solver type.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFromOptions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setFromOptions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setFromOptions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_20setFromOptions(struct PySlepcMFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFromOptions", 0);

  /* "SLEPc/MFN.pyx":156
 *         the solver type.
 *         """
 *         CHKERR( MFNSetFromOptions(self.mfn) )             # <<<<<<<<<<<<<<
 * 
 *     def getTolerances(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetFromOptions(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 156, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":150
 *         CHKERR( MFNAppendOptionsPrefix(self.mfn, cval) )
 * 
 *     def setFromOptions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets MFN options from the options database. This routine must
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFromOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":158
 *         CHKERR( MFNSetFromOptions(self.mfn) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_22getTolerances[] = "MFN.getTolerances(self)\n\n        Gets the tolerance and maximum iteration count used by the\n        default MFN convergence tests.\n\n        Returns\n        -------\n        tol: float\n            The convergence tolerance.\n        max_it: int\n            The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTolerances (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getTolerances", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getTolerances", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_22getTolerances(struct PySlepcMFNObject *__pyx_v_self) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  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;
  __Pyx_RefNannySetupContext("getTolerances", 0);

  /* "SLEPc/MFN.pyx":170
 *             The maximum number of iterations
 *         """
 *         cdef PetscReal rval = 0             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = 0
 *         CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) )
 */
  __pyx_v_rval = 0.0;

  /* "SLEPc/MFN.pyx":171
 *         """
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))
 */
  __pyx_v_ival = 0;

  /* "SLEPc/MFN.pyx":172
 *         cdef PetscReal rval = 0
 *         cdef PetscInt  ival = 0
 *         CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) )             # <<<<<<<<<<<<<<
 *         return (toReal(rval), toInt(ival))
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetTolerances(__pyx_v_self->mfn, (&__pyx_v_rval), (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 172, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":173
 *         cdef PetscInt  ival = 0
 *         CHKERR( MFNGetTolerances(self.mfn, &rval, &ival) )
 *         return (toReal(rval), toInt(ival))             # <<<<<<<<<<<<<<
 * 
 *     def setTolerances(self, tol=None, max_it=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toReal(__pyx_v_rval); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":158
 *         CHKERR( MFNSetFromOptions(self.mfn) )
 * 
 *     def getTolerances(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":175
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_24setTolerances[] = "MFN.setTolerances(self, tol=None, max_it=None)\n\n        Sets the tolerance and maximum iteration count used by the\n        default MFN convergence tests.\n\n        Parameters\n        ----------\n        tol: float, optional\n            The convergence tolerance.\n        max_it: int, optional\n            The maximum number of iterations\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tol = 0;
  PyObject *__pyx_v_max_it = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTolerances (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tol,&__pyx_n_s_max_it,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tol);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_it);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTolerances") < 0)) __PYX_ERR(17, 175, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tol = values[0];
    __pyx_v_max_it = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTolerances", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 175, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_tol, __pyx_v_max_it);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_24setTolerances(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_tol, PyObject *__pyx_v_max_it) {
  PetscReal __pyx_v_rval;
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PetscReal __pyx_t_3;
  PetscInt __pyx_t_4;
  int __pyx_t_5;
  __Pyx_RefNannySetupContext("setTolerances", 0);

  /* "SLEPc/MFN.pyx":187
 *             The maximum number of iterations
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 */
  __pyx_v_rval = PETSC_DEFAULT;

  /* "SLEPc/MFN.pyx":188
 *         """
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 */
  __pyx_v_ival = PETSC_DEFAULT;

  /* "SLEPc/MFN.pyx":189
 *         cdef PetscReal rval = PETSC_DEFAULT
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)             # <<<<<<<<<<<<<<
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( MFNSetTolerances(self.mfn, rval, ival) )
 */
  __pyx_t_1 = (__pyx_v_tol != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {
    __pyx_t_3 = __pyx_f_8slepc4py_5SLEPc_asReal(__pyx_v_tol); if (unlikely(__pyx_t_3 == -1.0 && PyErr_Occurred())) __PYX_ERR(17, 189, __pyx_L1_error)
    __pyx_v_rval = __pyx_t_3;
  }

  /* "SLEPc/MFN.pyx":190
 *         cdef PetscInt  ival = PETSC_DEFAULT
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)             # <<<<<<<<<<<<<<
 *         CHKERR( MFNSetTolerances(self.mfn, rval, ival) )
 * 
 */
  __pyx_t_2 = (__pyx_v_max_it != Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {
    __pyx_t_4 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_max_it); if (unlikely(__pyx_t_4 == -1L && PyErr_Occurred())) __PYX_ERR(17, 190, __pyx_L1_error)
    __pyx_v_ival = __pyx_t_4;
  }

  /* "SLEPc/MFN.pyx":191
 *         if tol    is not None: rval = asReal(tol)
 *         if max_it is not None: ival = asInt(max_it)
 *         CHKERR( MFNSetTolerances(self.mfn, rval, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getDimensions(self):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetTolerances(__pyx_v_self->mfn, __pyx_v_rval, __pyx_v_ival)); if (unlikely(__pyx_t_5 == -1)) __PYX_ERR(17, 191, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":175
 *         return (toReal(rval), toInt(ival))
 * 
 *     def setTolerances(self, tol=None, max_it=None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the tolerance and maximum iteration count used by the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setTolerances", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":193
 *         CHKERR( MFNSetTolerances(self.mfn, rval, ival) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the dimension of the subspace used by the solver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_26getDimensions[] = "MFN.getDimensions(self)\n\n        Gets the dimension of the subspace used by the solver.\n\n        Returns\n        -------\n        ncv: int\n            Maximum dimension of the subspace to be used by the solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDimensions (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getDimensions", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getDimensions", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_26getDimensions(struct PySlepcMFNObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getDimensions", 0);

  /* "SLEPc/MFN.pyx":202
 *             Maximum dimension of the subspace to be used by the solver.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetDimensions(self.mfn, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/MFN.pyx":203
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( MFNGetDimensions(self.mfn, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetDimensions(__pyx_v_self->mfn, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 203, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":204
 *         cdef PetscInt ival = 0
 *         CHKERR( MFNGetDimensions(self.mfn, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def setDimensions(self, ncv):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":193
 *         CHKERR( MFNSetTolerances(self.mfn, rval, ival) )
 * 
 *     def getDimensions(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the dimension of the subspace used by the solver.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":206
 *         return toInt(ival)
 * 
 *     def setDimensions(self, ncv):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the dimension of the subspace to be used by the solver.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_28setDimensions[] = "MFN.setDimensions(self, ncv)\n\n        Sets the dimension of the subspace to be used by the solver.\n\n        Parameters\n        ----------\n        ncv: int\n            Maximum dimension of the subspace to be used by the\n            solver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ncv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setDimensions (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ncv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ncv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDimensions") < 0)) __PYX_ERR(17, 206, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ncv = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setDimensions", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 206, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_ncv);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_28setDimensions(struct PySlepcMFNObject *__pyx_v_self, PyObject *__pyx_v_ncv) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PetscInt __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("setDimensions", 0);

  /* "SLEPc/MFN.pyx":216
 *             solver.
 *         """
 *         cdef PetscInt ival = asInt(ncv)             # <<<<<<<<<<<<<<
 *         CHKERR( MFNSetDimensions(self.mfn, ival) )
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_asInt(__pyx_v_ncv); if (unlikely(__pyx_t_1 == -1L && PyErr_Occurred())) __PYX_ERR(17, 216, __pyx_L1_error)
  __pyx_v_ival = __pyx_t_1;

  /* "SLEPc/MFN.pyx":217
 *         """
 *         cdef PetscInt ival = asInt(ncv)
 *         CHKERR( MFNSetDimensions(self.mfn, ival) )             # <<<<<<<<<<<<<<
 * 
 *     def getFN(self):
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetDimensions(__pyx_v_self->mfn, __pyx_v_ival)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 217, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":206
 *         return toInt(ival)
 * 
 *     def setDimensions(self, ncv):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the dimension of the subspace to be used by the solver.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setDimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":219
 *         CHKERR( MFNSetDimensions(self.mfn, ival) )
 * 
 *     def getFN(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the math function object associated to the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_30getFN[] = "MFN.getFN(self)\n\n        Obtain the math function object associated to the MFN object.\n\n        Returns\n        -------\n        fn: FN\n            The math function context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFN (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getFN", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getFN", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_30getFN(struct PySlepcMFNObject *__pyx_v_self) {
  struct PySlepcFNObject *__pyx_v_fn = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getFN", 0);

  /* "SLEPc/MFN.pyx":228
 *             The math function context.
 *         """
 *         cdef FN fn = FN()             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetFN(self.mfn, &fn.fn) )
 *         PetscINCREF(fn.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fn = ((struct PySlepcFNObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":229
 *         """
 *         cdef FN fn = FN()
 *         CHKERR( MFNGetFN(self.mfn, &fn.fn) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(fn.obj)
 *         return fn
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetFN(__pyx_v_self->mfn, (&__pyx_v_fn->fn))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 229, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":230
 *         cdef FN fn = FN()
 *         CHKERR( MFNGetFN(self.mfn, &fn.fn) )
 *         PetscINCREF(fn.obj)             # <<<<<<<<<<<<<<
 *         return fn
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_fn->__pyx_base.obj);

  /* "SLEPc/MFN.pyx":231
 *         CHKERR( MFNGetFN(self.mfn, &fn.fn) )
 *         PetscINCREF(fn.obj)
 *         return fn             # <<<<<<<<<<<<<<
 * 
 *     def setFN(self, FN fn not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fn));
  __pyx_r = ((PyObject *)__pyx_v_fn);
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":219
 *         CHKERR( MFNSetDimensions(self.mfn, ival) )
 * 
 *     def getFN(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the math function object associated to the MFN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getFN", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":233
 *         return fn
 * 
 *     def setFN(self, FN fn not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a math function object to the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_32setFN[] = "MFN.setFN(self, FN fn)\n\n        Associates a math function object to the MFN object.\n\n        Parameters\n        ----------\n        fn: FN\n            The math function context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcFNObject *__pyx_v_fn = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setFN (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fn,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fn)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setFN") < 0)) __PYX_ERR(17, 233, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_fn = ((struct PySlepcFNObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setFN", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFN", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fn), __pyx_ptype_8slepc4py_5SLEPc_FN, 0, "fn", 0))) __PYX_ERR(17, 233, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_fn);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_32setFN(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcFNObject *__pyx_v_fn) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setFN", 0);

  /* "SLEPc/MFN.pyx":242
 *             The math function context.
 *         """
 *         CHKERR( MFNSetFN(self.mfn, fn.fn) )             # <<<<<<<<<<<<<<
 * 
 *     def getBV(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetFN(__pyx_v_self->mfn, __pyx_v_fn->fn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 242, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":233
 *         return fn
 * 
 *     def setFN(self, FN fn not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a math function object to the MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setFN", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":244
 *         CHKERR( MFNSetFN(self.mfn, fn.fn) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vector object associated to the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_34getBV[] = "MFN.getBV(self)\n\n        Obtain the basis vector object associated to the MFN object.\n\n        Returns\n        -------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBV (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getBV", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getBV", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_34getBV(struct PySlepcMFNObject *__pyx_v_self) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getBV", 0);

  /* "SLEPc/MFN.pyx":253
 *             The basis vectors context.
 *         """
 *         cdef BV bv = BV()             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetBV(self.mfn, &bv.bv) )
 *         PetscINCREF(bv.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":254
 *         """
 *         cdef BV bv = BV()
 *         CHKERR( MFNGetBV(self.mfn, &bv.bv) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(bv.obj)
 *         return bv
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetBV(__pyx_v_self->mfn, (&__pyx_v_bv->bv))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 254, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":255
 *         cdef BV bv = BV()
 *         CHKERR( MFNGetBV(self.mfn, &bv.bv) )
 *         PetscINCREF(bv.obj)             # <<<<<<<<<<<<<<
 *         return bv
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_bv->__pyx_base.obj);

  /* "SLEPc/MFN.pyx":256
 *         CHKERR( MFNGetBV(self.mfn, &bv.bv) )
 *         PetscINCREF(bv.obj)
 *         return bv             # <<<<<<<<<<<<<<
 * 
 *     def setBV(self, BV bv not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_bv));
  __pyx_r = ((PyObject *)__pyx_v_bv);
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":244
 *         CHKERR( MFNSetFN(self.mfn, fn.fn) )
 * 
 *     def getBV(self):             # <<<<<<<<<<<<<<
 *         """
 *         Obtain the basis vector object associated to the MFN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_bv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":258
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vector object to the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_36setBV[] = "MFN.setBV(self, BV bv)\n\n        Associates a basis vector object to the MFN object.\n\n        Parameters\n        ----------\n        bv: BV\n            The basis vectors context.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PySlepcBVObject *__pyx_v_bv = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBV (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bv,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_bv)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBV") < 0)) __PYX_ERR(17, 258, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_bv = ((struct PySlepcBVObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBV", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 258, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bv), __pyx_ptype_8slepc4py_5SLEPc_BV, 0, "bv", 0))) __PYX_ERR(17, 258, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_bv);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_36setBV(struct PySlepcMFNObject *__pyx_v_self, struct PySlepcBVObject *__pyx_v_bv) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setBV", 0);

  /* "SLEPc/MFN.pyx":267
 *             The basis vectors context.
 *         """
 *         CHKERR( MFNSetBV(self.mfn, bv.bv) )             # <<<<<<<<<<<<<<
 * 
 *     def getOperator(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetBV(__pyx_v_self->mfn, __pyx_v_bv->bv)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 267, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":258
 *         return bv
 * 
 *     def setBV(self, BV bv not None):             # <<<<<<<<<<<<<<
 *         """
 *         Associates a basis vector object to the MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setBV", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":269
 *         CHKERR( MFNSetBV(self.mfn, bv.bv) )
 * 
 *     def getOperator(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrix associated with the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_38getOperator[] = "MFN.getOperator(self)\n\n        Gets the matrix associated with the MFN object.\n\n        Returns\n        -------\n        A: Mat\n            The matrix for which the matrix function is to be computed.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getOperator (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getOperator", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getOperator", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_38getOperator(struct PySlepcMFNObject *__pyx_v_self) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getOperator", 0);

  /* "SLEPc/MFN.pyx":278
 *             The matrix for which the matrix function is to be computed.
 *         """
 *         cdef Mat A = Mat()             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetOperator(self.mfn, &A.mat) )
 *         PetscINCREF(A.obj)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8petsc4py_5PETSc_Mat), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_A = ((struct PyPetscMatObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/MFN.pyx":279
 *         """
 *         cdef Mat A = Mat()
 *         CHKERR( MFNGetOperator(self.mfn, &A.mat) )             # <<<<<<<<<<<<<<
 *         PetscINCREF(A.obj)
 *         return A
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetOperator(__pyx_v_self->mfn, (&__pyx_v_A->mat))); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(17, 279, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":280
 *         cdef Mat A = Mat()
 *         CHKERR( MFNGetOperator(self.mfn, &A.mat) )
 *         PetscINCREF(A.obj)             # <<<<<<<<<<<<<<
 *         return A
 * 
 */
  __pyx_f_8slepc4py_5SLEPc_PetscINCREF(__pyx_v_A->__pyx_base.obj);

  /* "SLEPc/MFN.pyx":281
 *         CHKERR( MFNGetOperator(self.mfn, &A.mat) )
 *         PetscINCREF(A.obj)
 *         return A             # <<<<<<<<<<<<<<
 * 
 *     def setOperator(self, Mat A not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_A));
  __pyx_r = ((PyObject *)__pyx_v_A);
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":269
 *         CHKERR( MFNSetBV(self.mfn, bv.bv) )
 * 
 *     def getOperator(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the matrix associated with the MFN object.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_A);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":283
 *         return A
 * 
 *     def setOperator(self, Mat A not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrix associated with the MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_40setOperator[] = "MFN.setOperator(self, Mat A)\n\n        Sets the matrix associated with the MFN object.\n\n        Parameters\n        ----------\n        A: Mat\n            The problem matrix.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscMatObject *__pyx_v_A = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setOperator (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_A,0};
    PyObject* values[1] = {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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_A)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setOperator") < 0)) __PYX_ERR(17, 283, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_A = ((struct PyPetscMatObject *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setOperator", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 283, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_8petsc4py_5PETSc_Mat, 0, "A", 0))) __PYX_ERR(17, 283, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_A);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_40setOperator(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscMatObject *__pyx_v_A) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setOperator", 0);

  /* "SLEPc/MFN.pyx":292
 *             The problem matrix.
 *         """
 *         CHKERR( MFNSetOperator(self.mfn, A.mat) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetOperator(__pyx_v_self->mfn, __pyx_v_A->mat)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 292, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":283
 *         return A
 * 
 *     def setOperator(self, Mat A not None):             # <<<<<<<<<<<<<<
 *         """
 *         Sets the matrix associated with the MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setOperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":296
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a MFN object.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_42cancelMonitor[] = "MFN.cancelMonitor(self)\n\n        Clears all monitors for a MFN object.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cancelMonitor (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("cancelMonitor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancelMonitor", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_42cancelMonitor(struct PySlepcMFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("cancelMonitor", 0);

  /* "SLEPc/MFN.pyx":300
 *         Clears all monitors for a MFN object.
 *         """
 *         CHKERR( MFNMonitorCancel(self.mfn) )             # <<<<<<<<<<<<<<
 * 
 *     #
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNMonitorCancel(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 300, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":296
 *     #
 * 
 *     def cancelMonitor(self):             # <<<<<<<<<<<<<<
 *         """
 *         Clears all monitors for a MFN object.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.cancelMonitor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":304
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_44setUp[] = "MFN.setUp(self)\n\n        Sets up all the internal data structures necessary for the\n        execution of the eigensolver.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setUp (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("setUp", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "setUp", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_44setUp(struct PySlepcMFNObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setUp", 0);

  /* "SLEPc/MFN.pyx":309
 *         execution of the eigensolver.
 *         """
 *         CHKERR( MFNSetUp(self.mfn) )             # <<<<<<<<<<<<<<
 * 
 *     def solve(self, Vec b not None, Vec x not None):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSetUp(__pyx_v_self->mfn)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 309, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":304
 *     #
 * 
 *     def setUp(self):             # <<<<<<<<<<<<<<
 *         """
 *         Sets up all the internal data structures necessary for the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.setUp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":311
 *         CHKERR( MFNSetUp(self.mfn) )
 * 
 *     def solve(self, Vec b not None, Vec x not None):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the matrix function problem. Given a vector b, the
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_46solve[] = "MFN.solve(self, Vec b, Vec x)\n\n        Solves the matrix function problem. Given a vector b, the\n        vector x = f(alpha*A)*b is returned.\n\n        Parameters\n        ----------\n        b: Vec\n            The right hand side vector.\n        x: Vec\n            The solution.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct PyPetscVecObject *__pyx_v_b = 0;
  struct PyPetscVecObject *__pyx_v_x = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("solve (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_b,&__pyx_n_s_x,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);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, 1); __PYX_ERR(17, 311, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "solve") < 0)) __PYX_ERR(17, 311, __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_b = ((struct PyPetscVecObject *)values[0]);
    __pyx_v_x = ((struct PyPetscVecObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("solve", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(17, 311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "b", 0))) __PYX_ERR(17, 311, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_8petsc4py_5PETSc_Vec, 0, "x", 0))) __PYX_ERR(17, 311, __pyx_L1_error)
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(((struct PySlepcMFNObject *)__pyx_v_self), __pyx_v_b, __pyx_v_x);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_46solve(struct PySlepcMFNObject *__pyx_v_self, struct PyPetscVecObject *__pyx_v_b, struct PyPetscVecObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("solve", 0);

  /* "SLEPc/MFN.pyx":323
 *             The solution.
 *         """
 *         CHKERR( MFNSolve(self.mfn, b.vec, x.vec) )             # <<<<<<<<<<<<<<
 * 
 *     def getIterationNumber(self):
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNSolve(__pyx_v_self->mfn, __pyx_v_b->vec, __pyx_v_x->vec)); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 323, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":311
 *         CHKERR( MFNSetUp(self.mfn) )
 * 
 *     def solve(self, Vec b not None, Vec x not None):             # <<<<<<<<<<<<<<
 *         """
 *         Solves the matrix function problem. Given a vector b, the
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":325
 *         CHKERR( MFNSolve(self.mfn, b.vec, x.vec) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_48getIterationNumber[] = "MFN.getIterationNumber(self)\n\n        Gets the current iteration number. If the call to `solve()` is\n        complete, then it returns the number of iterations carried out\n        by the solution method.\n\n        Returns\n        -------\n        its: int\n             Iteration number.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIterationNumber (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getIterationNumber", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getIterationNumber", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_48getIterationNumber(struct PySlepcMFNObject *__pyx_v_self) {
  PetscInt __pyx_v_ival;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getIterationNumber", 0);

  /* "SLEPc/MFN.pyx":336
 *              Iteration number.
 *         """
 *         cdef PetscInt ival = 0             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetIterationNumber(self.mfn, &ival) )
 *         return toInt(ival)
 */
  __pyx_v_ival = 0;

  /* "SLEPc/MFN.pyx":337
 *         """
 *         cdef PetscInt ival = 0
 *         CHKERR( MFNGetIterationNumber(self.mfn, &ival) )             # <<<<<<<<<<<<<<
 *         return toInt(ival)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetIterationNumber(__pyx_v_self->mfn, (&__pyx_v_ival))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 337, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":338
 *         cdef PetscInt ival = 0
 *         CHKERR( MFNGetIterationNumber(self.mfn, &ival) )
 *         return toInt(ival)             # <<<<<<<<<<<<<<
 * 
 *     def getConvergedReason(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_toInt(__pyx_v_ival); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":325
 *         CHKERR( MFNSolve(self.mfn, b.vec, x.vec) )
 * 
 *     def getIterationNumber(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the current iteration number. If the call to `solve()` is
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getIterationNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/MFN.pyx":340
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_3MFN_50getConvergedReason[] = "MFN.getConvergedReason(self)\n\n        Gets the reason why the `solve()` iteration was stopped.\n\n        Returns\n        -------\n        reason: `MFN.ConvergedReason` enumerate\n            Negative value indicates diverged, positive value\n            converged.\n        ";
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConvergedReason (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("getConvergedReason", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "getConvergedReason", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(((struct PySlepcMFNObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_3MFN_50getConvergedReason(struct PySlepcMFNObject *__pyx_v_self) {
  MFNConvergedReason __pyx_v_val;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getConvergedReason", 0);

  /* "SLEPc/MFN.pyx":350
 *             converged.
 *         """
 *         cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *         CHKERR( MFNGetConvergedReason(self.mfn, &val) )
 *         return val
 */
  __pyx_v_val = MFN_CONVERGED_ITERATING;

  /* "SLEPc/MFN.pyx":351
 *         """
 *         cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING
 *         CHKERR( MFNGetConvergedReason(self.mfn, &val) )             # <<<<<<<<<<<<<<
 *         return val
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(MFNGetConvergedReason(__pyx_v_self->mfn, (&__pyx_v_val))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(17, 351, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":352
 *         cdef SlepcMFNConvergedReason val = MFN_CONVERGED_ITERATING
 *         CHKERR( MFNGetConvergedReason(self.mfn, &val) )
 *         return val             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_MFNConvergedReason(__pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "SLEPc/MFN.pyx":340
 *         return toInt(ival)
 * 
 *     def getConvergedReason(self):             # <<<<<<<<<<<<<<
 *         """
 *         Gets the reason why the `solve()` iteration was stopped.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("slepc4py.SLEPc.MFN.getConvergedReason", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline int setref(void *d, void *s) except -1:             # <<<<<<<<<<<<<<
 *     cdef PetscObject *dest  = <PetscObject*> d
 *     cdef PetscObject source = <PetscObject>  s
 */

static CYTHON_INLINE int __pyx_f_8slepc4py_5SLEPc_setref(void *__pyx_v_d, void *__pyx_v_s) {
  PetscObject *__pyx_v_dest;
  PetscObject __pyx_v_source;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("setref", 0);

  /* "SLEPc/CAPI.pyx":4
 * 
 * cdef inline int setref(void *d, void *s) except -1:
 *     cdef PetscObject *dest  = <PetscObject*> d             # <<<<<<<<<<<<<<
 *     cdef PetscObject source = <PetscObject>  s
 *     CHKERR( PetscINCREF(&source) )
 */
  __pyx_v_dest = ((PetscObject *)__pyx_v_d);

  /* "SLEPc/CAPI.pyx":5
 * cdef inline int setref(void *d, void *s) except -1:
 *     cdef PetscObject *dest  = <PetscObject*> d
 *     cdef PetscObject source = <PetscObject>  s             # <<<<<<<<<<<<<<
 *     CHKERR( PetscINCREF(&source) )
 *     dest[0] = source
 */
  __pyx_v_source = ((PetscObject)__pyx_v_s);

  /* "SLEPc/CAPI.pyx":6
 *     cdef PetscObject *dest  = <PetscObject*> d
 *     cdef PetscObject source = <PetscObject>  s
 *     CHKERR( PetscINCREF(&source) )             # <<<<<<<<<<<<<<
 *     dest[0] = source
 *     return 0
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(__pyx_f_8slepc4py_5SLEPc_PetscINCREF((&__pyx_v_source))); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(18, 6, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":7
 *     cdef PetscObject source = <PetscObject>  s
 *     CHKERR( PetscINCREF(&source) )
 *     dest[0] = source             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  (__pyx_v_dest[0]) = __pyx_v_source;

  /* "SLEPc/CAPI.pyx":8
 *     CHKERR( PetscINCREF(&source) )
 *     dest[0] = source
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * cdef inline int setref(void *d, void *s) except -1:             # <<<<<<<<<<<<<<
 *     cdef PetscObject *dest  = <PetscObject*> d
 *     cdef PetscObject source = <PetscObject>  s
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.setref", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":14
 * # -- ST --
 * 
 * cdef api object PySlepcST_New(SlepcST arg):             # <<<<<<<<<<<<<<
 *     cdef ST retv = ST()
 *     setref(&retv.st, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcST_New(ST __pyx_v_arg) {
  struct PySlepcSTObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcST_New", 0);

  /* "SLEPc/CAPI.pyx":15
 * 
 * cdef api object PySlepcST_New(SlepcST arg):
 *     cdef ST retv = ST()             # <<<<<<<<<<<<<<
 *     setref(&retv.st, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcSTObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":16
 * cdef api object PySlepcST_New(SlepcST arg):
 *     cdef ST retv = ST()
 *     setref(&retv.st, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->st), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 16, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":17
 *     cdef ST retv = ST()
 *     setref(&retv.st, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":14
 * # -- ST --
 * 
 * cdef api object PySlepcST_New(SlepcST arg):             # <<<<<<<<<<<<<<
 *     cdef ST retv = ST()
 *     setref(&retv.st, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcST_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":19
 *     return retv
 * 
 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcST retv = NULL
 *     cdef ST ob = <ST?> arg
 */

static ST __pyx_f_8slepc4py_5SLEPc_PySlepcST_Get(PyObject *__pyx_v_arg) {
  ST __pyx_v_retv;
  struct PySlepcSTObject *__pyx_v_ob = 0;
  ST __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  ST __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcST_Get", 0);

  /* "SLEPc/CAPI.pyx":20
 * 
 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL:
 *     cdef SlepcST retv = NULL             # <<<<<<<<<<<<<<
 *     cdef ST ob = <ST?> arg
 *     retv = ob.st
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":21
 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL:
 *     cdef SlepcST retv = NULL
 *     cdef ST ob = <ST?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.st
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_ST)))) __PYX_ERR(18, 21, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcSTObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":22
 *     cdef SlepcST retv = NULL
 *     cdef ST ob = <ST?> arg
 *     retv = ob.st             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->st;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":23
 *     cdef ST ob = <ST?> arg
 *     retv = ob.st
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":19
 *     return retv
 * 
 * cdef api SlepcST PySlepcST_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcST retv = NULL
 *     cdef ST ob = <ST?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcST_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":29
 * # -- BV --
 * 
 * cdef api object PySlepcBV_New(SlepcBV arg):             # <<<<<<<<<<<<<<
 *     cdef BV retv = BV()
 *     setref(&retv.bv, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New(BV __pyx_v_arg) {
  struct PySlepcBVObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcBV_New", 0);

  /* "SLEPc/CAPI.pyx":30
 * 
 * cdef api object PySlepcBV_New(SlepcBV arg):
 *     cdef BV retv = BV()             # <<<<<<<<<<<<<<
 *     setref(&retv.bv, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":31
 * cdef api object PySlepcBV_New(SlepcBV arg):
 *     cdef BV retv = BV()
 *     setref(&retv.bv, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->bv), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 31, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":32
 *     cdef BV retv = BV()
 *     setref(&retv.bv, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":29
 * # -- BV --
 * 
 * cdef api object PySlepcBV_New(SlepcBV arg):             # <<<<<<<<<<<<<<
 *     cdef BV retv = BV()
 *     setref(&retv.bv, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcBV_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":34
 *     return retv
 * 
 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcBV retv = NULL
 *     cdef BV ob = <BV?> arg
 */

static BV __pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get(PyObject *__pyx_v_arg) {
  BV __pyx_v_retv;
  struct PySlepcBVObject *__pyx_v_ob = 0;
  BV __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  BV __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcBV_Get", 0);

  /* "SLEPc/CAPI.pyx":35
 * 
 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL:
 *     cdef SlepcBV retv = NULL             # <<<<<<<<<<<<<<
 *     cdef BV ob = <BV?> arg
 *     retv = ob.bv
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":36
 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL:
 *     cdef SlepcBV retv = NULL
 *     cdef BV ob = <BV?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.bv
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_BV)))) __PYX_ERR(18, 36, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcBVObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":37
 *     cdef SlepcBV retv = NULL
 *     cdef BV ob = <BV?> arg
 *     retv = ob.bv             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->bv;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":38
 *     cdef BV ob = <BV?> arg
 *     retv = ob.bv
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":34
 *     return retv
 * 
 * cdef api SlepcBV PySlepcBV_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcBV retv = NULL
 *     cdef BV ob = <BV?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcBV_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":44
 * # -- DS --
 * 
 * cdef api object PySlepcDS_New(SlepcDS arg):             # <<<<<<<<<<<<<<
 *     cdef DS retv = DS()
 *     setref(&retv.ds, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New(DS __pyx_v_arg) {
  struct PySlepcDSObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcDS_New", 0);

  /* "SLEPc/CAPI.pyx":45
 * 
 * cdef api object PySlepcDS_New(SlepcDS arg):
 *     cdef DS retv = DS()             # <<<<<<<<<<<<<<
 *     setref(&retv.ds, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcDSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":46
 * cdef api object PySlepcDS_New(SlepcDS arg):
 *     cdef DS retv = DS()
 *     setref(&retv.ds, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->ds), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 46, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":47
 *     cdef DS retv = DS()
 *     setref(&retv.ds, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":44
 * # -- DS --
 * 
 * cdef api object PySlepcDS_New(SlepcDS arg):             # <<<<<<<<<<<<<<
 *     cdef DS retv = DS()
 *     setref(&retv.ds, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcDS_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":49
 *     return retv
 * 
 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcDS retv = NULL
 *     cdef DS ob = <DS?> arg
 */

static DS __pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get(PyObject *__pyx_v_arg) {
  DS __pyx_v_retv;
  struct PySlepcDSObject *__pyx_v_ob = 0;
  DS __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  DS __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcDS_Get", 0);

  /* "SLEPc/CAPI.pyx":50
 * 
 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL:
 *     cdef SlepcDS retv = NULL             # <<<<<<<<<<<<<<
 *     cdef DS ob = <DS?> arg
 *     retv = ob.ds
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":51
 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL:
 *     cdef SlepcDS retv = NULL
 *     cdef DS ob = <DS?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.ds
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_DS)))) __PYX_ERR(18, 51, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcDSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":52
 *     cdef SlepcDS retv = NULL
 *     cdef DS ob = <DS?> arg
 *     retv = ob.ds             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->ds;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":53
 *     cdef DS ob = <DS?> arg
 *     retv = ob.ds
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":49
 *     return retv
 * 
 * cdef api SlepcDS PySlepcDS_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcDS retv = NULL
 *     cdef DS ob = <DS?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcDS_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":59
 * # -- FN --
 * 
 * cdef api object PySlepcFN_New(SlepcFN arg):             # <<<<<<<<<<<<<<
 *     cdef FN retv = FN()
 *     setref(&retv.fn, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New(FN __pyx_v_arg) {
  struct PySlepcFNObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcFN_New", 0);

  /* "SLEPc/CAPI.pyx":60
 * 
 * cdef api object PySlepcFN_New(SlepcFN arg):
 *     cdef FN retv = FN()             # <<<<<<<<<<<<<<
 *     setref(&retv.fn, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcFNObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":61
 * cdef api object PySlepcFN_New(SlepcFN arg):
 *     cdef FN retv = FN()
 *     setref(&retv.fn, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->fn), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 61, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":62
 *     cdef FN retv = FN()
 *     setref(&retv.fn, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":59
 * # -- FN --
 * 
 * cdef api object PySlepcFN_New(SlepcFN arg):             # <<<<<<<<<<<<<<
 *     cdef FN retv = FN()
 *     setref(&retv.fn, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcFN_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":64
 *     return retv
 * 
 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcFN retv = NULL
 *     cdef FN ob = <FN?> arg
 */

static FN __pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get(PyObject *__pyx_v_arg) {
  FN __pyx_v_retv;
  struct PySlepcFNObject *__pyx_v_ob = 0;
  FN __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  FN __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcFN_Get", 0);

  /* "SLEPc/CAPI.pyx":65
 * 
 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL:
 *     cdef SlepcFN retv = NULL             # <<<<<<<<<<<<<<
 *     cdef FN ob = <FN?> arg
 *     retv = ob.fn
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":66
 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL:
 *     cdef SlepcFN retv = NULL
 *     cdef FN ob = <FN?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.fn
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_FN)))) __PYX_ERR(18, 66, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcFNObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":67
 *     cdef SlepcFN retv = NULL
 *     cdef FN ob = <FN?> arg
 *     retv = ob.fn             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->fn;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":68
 *     cdef FN ob = <FN?> arg
 *     retv = ob.fn
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":64
 *     return retv
 * 
 * cdef api SlepcFN PySlepcFN_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcFN retv = NULL
 *     cdef FN ob = <FN?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcFN_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":74
 * # -- RG --
 * 
 * cdef api object PySlepcRG_New(SlepcRG arg):             # <<<<<<<<<<<<<<
 *     cdef RG retv = RG()
 *     setref(&retv.rg, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New(RG __pyx_v_arg) {
  struct PySlepcRGObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcRG_New", 0);

  /* "SLEPc/CAPI.pyx":75
 * 
 * cdef api object PySlepcRG_New(SlepcRG arg):
 *     cdef RG retv = RG()             # <<<<<<<<<<<<<<
 *     setref(&retv.rg, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcRGObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":76
 * cdef api object PySlepcRG_New(SlepcRG arg):
 *     cdef RG retv = RG()
 *     setref(&retv.rg, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->rg), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 76, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":77
 *     cdef RG retv = RG()
 *     setref(&retv.rg, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":74
 * # -- RG --
 * 
 * cdef api object PySlepcRG_New(SlepcRG arg):             # <<<<<<<<<<<<<<
 *     cdef RG retv = RG()
 *     setref(&retv.rg, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcRG_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":79
 *     return retv
 * 
 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcRG retv = NULL
 *     cdef RG ob = <RG?> arg
 */

static RG __pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get(PyObject *__pyx_v_arg) {
  RG __pyx_v_retv;
  struct PySlepcRGObject *__pyx_v_ob = 0;
  RG __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  RG __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcRG_Get", 0);

  /* "SLEPc/CAPI.pyx":80
 * 
 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL:
 *     cdef SlepcRG retv = NULL             # <<<<<<<<<<<<<<
 *     cdef RG ob = <RG?> arg
 *     retv = ob.rg
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":81
 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL:
 *     cdef SlepcRG retv = NULL
 *     cdef RG ob = <RG?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.rg
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_RG)))) __PYX_ERR(18, 81, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcRGObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":82
 *     cdef SlepcRG retv = NULL
 *     cdef RG ob = <RG?> arg
 *     retv = ob.rg             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->rg;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":83
 *     cdef RG ob = <RG?> arg
 *     retv = ob.rg
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":79
 *     return retv
 * 
 * cdef api SlepcRG PySlepcRG_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcRG retv = NULL
 *     cdef RG ob = <RG?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcRG_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":89
 * # -- EPS --
 * 
 * cdef api object PySlepcEPS_New(SlepcEPS arg):             # <<<<<<<<<<<<<<
 *     cdef EPS retv = EPS()
 *     setref(&retv.eps, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New(EPS __pyx_v_arg) {
  struct PySlepcEPSObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcEPS_New", 0);

  /* "SLEPc/CAPI.pyx":90
 * 
 * cdef api object PySlepcEPS_New(SlepcEPS arg):
 *     cdef EPS retv = EPS()             # <<<<<<<<<<<<<<
 *     setref(&retv.eps, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcEPSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":91
 * cdef api object PySlepcEPS_New(SlepcEPS arg):
 *     cdef EPS retv = EPS()
 *     setref(&retv.eps, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->eps), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 91, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":92
 *     cdef EPS retv = EPS()
 *     setref(&retv.eps, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":89
 * # -- EPS --
 * 
 * cdef api object PySlepcEPS_New(SlepcEPS arg):             # <<<<<<<<<<<<<<
 *     cdef EPS retv = EPS()
 *     setref(&retv.eps, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcEPS_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":94
 *     return retv
 * 
 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcEPS retv = NULL
 *     cdef EPS ob = <EPS?> arg
 */

static EPS __pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get(PyObject *__pyx_v_arg) {
  EPS __pyx_v_retv;
  struct PySlepcEPSObject *__pyx_v_ob = 0;
  EPS __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  EPS __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcEPS_Get", 0);

  /* "SLEPc/CAPI.pyx":95
 * 
 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL:
 *     cdef SlepcEPS retv = NULL             # <<<<<<<<<<<<<<
 *     cdef EPS ob = <EPS?> arg
 *     retv = ob.eps
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":96
 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL:
 *     cdef SlepcEPS retv = NULL
 *     cdef EPS ob = <EPS?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.eps
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_EPS)))) __PYX_ERR(18, 96, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcEPSObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":97
 *     cdef SlepcEPS retv = NULL
 *     cdef EPS ob = <EPS?> arg
 *     retv = ob.eps             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->eps;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":98
 *     cdef EPS ob = <EPS?> arg
 *     retv = ob.eps
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":94
 *     return retv
 * 
 * cdef api SlepcEPS PySlepcEPS_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcEPS retv = NULL
 *     cdef EPS ob = <EPS?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcEPS_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":104
 * # -- SVD --
 * 
 * cdef api object PySlepcSVD_New(SlepcSVD arg):             # <<<<<<<<<<<<<<
 *     cdef SVD retv = SVD()
 *     setref(&retv.svd, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New(SVD __pyx_v_arg) {
  struct PySlepcSVDObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcSVD_New", 0);

  /* "SLEPc/CAPI.pyx":105
 * 
 * cdef api object PySlepcSVD_New(SlepcSVD arg):
 *     cdef SVD retv = SVD()             # <<<<<<<<<<<<<<
 *     setref(&retv.svd, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcSVDObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":106
 * cdef api object PySlepcSVD_New(SlepcSVD arg):
 *     cdef SVD retv = SVD()
 *     setref(&retv.svd, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->svd), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 106, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":107
 *     cdef SVD retv = SVD()
 *     setref(&retv.svd, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":104
 * # -- SVD --
 * 
 * cdef api object PySlepcSVD_New(SlepcSVD arg):             # <<<<<<<<<<<<<<
 *     cdef SVD retv = SVD()
 *     setref(&retv.svd, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcSVD_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":109
 *     return retv
 * 
 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcSVD retv = NULL
 *     cdef SVD ob = <SVD?> arg
 */

static SVD __pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get(PyObject *__pyx_v_arg) {
  SVD __pyx_v_retv;
  struct PySlepcSVDObject *__pyx_v_ob = 0;
  SVD __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  SVD __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcSVD_Get", 0);

  /* "SLEPc/CAPI.pyx":110
 * 
 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL:
 *     cdef SlepcSVD retv = NULL             # <<<<<<<<<<<<<<
 *     cdef SVD ob = <SVD?> arg
 *     retv = ob.svd
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":111
 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL:
 *     cdef SlepcSVD retv = NULL
 *     cdef SVD ob = <SVD?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.svd
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_SVD)))) __PYX_ERR(18, 111, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcSVDObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":112
 *     cdef SlepcSVD retv = NULL
 *     cdef SVD ob = <SVD?> arg
 *     retv = ob.svd             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->svd;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":113
 *     cdef SVD ob = <SVD?> arg
 *     retv = ob.svd
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":109
 *     return retv
 * 
 * cdef api SlepcSVD PySlepcSVD_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcSVD retv = NULL
 *     cdef SVD ob = <SVD?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcSVD_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":119
 * # -- PEP --
 * 
 * cdef api object PySlepcPEP_New(SlepcPEP arg):             # <<<<<<<<<<<<<<
 *     cdef PEP retv = PEP()
 *     setref(&retv.pep, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New(PEP __pyx_v_arg) {
  struct PySlepcPEPObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcPEP_New", 0);

  /* "SLEPc/CAPI.pyx":120
 * 
 * cdef api object PySlepcPEP_New(SlepcPEP arg):
 *     cdef PEP retv = PEP()             # <<<<<<<<<<<<<<
 *     setref(&retv.pep, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcPEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":121
 * cdef api object PySlepcPEP_New(SlepcPEP arg):
 *     cdef PEP retv = PEP()
 *     setref(&retv.pep, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->pep), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 121, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":122
 *     cdef PEP retv = PEP()
 *     setref(&retv.pep, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":119
 * # -- PEP --
 * 
 * cdef api object PySlepcPEP_New(SlepcPEP arg):             # <<<<<<<<<<<<<<
 *     cdef PEP retv = PEP()
 *     setref(&retv.pep, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcPEP_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":124
 *     return retv
 * 
 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcPEP retv = NULL
 *     cdef PEP ob = <PEP?> arg
 */

static PEP __pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get(PyObject *__pyx_v_arg) {
  PEP __pyx_v_retv;
  struct PySlepcPEPObject *__pyx_v_ob = 0;
  PEP __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PEP __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcPEP_Get", 0);

  /* "SLEPc/CAPI.pyx":125
 * 
 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL:
 *     cdef SlepcPEP retv = NULL             # <<<<<<<<<<<<<<
 *     cdef PEP ob = <PEP?> arg
 *     retv = ob.pep
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":126
 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL:
 *     cdef SlepcPEP retv = NULL
 *     cdef PEP ob = <PEP?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.pep
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_PEP)))) __PYX_ERR(18, 126, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcPEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":127
 *     cdef SlepcPEP retv = NULL
 *     cdef PEP ob = <PEP?> arg
 *     retv = ob.pep             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->pep;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":128
 *     cdef PEP ob = <PEP?> arg
 *     retv = ob.pep
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":124
 *     return retv
 * 
 * cdef api SlepcPEP PySlepcPEP_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcPEP retv = NULL
 *     cdef PEP ob = <PEP?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcPEP_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":134
 * # -- NEP --
 * 
 * cdef api object PySlepcNEP_New(SlepcNEP arg):             # <<<<<<<<<<<<<<
 *     cdef NEP retv = NEP()
 *     setref(&retv.nep, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New(NEP __pyx_v_arg) {
  struct PySlepcNEPObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcNEP_New", 0);

  /* "SLEPc/CAPI.pyx":135
 * 
 * cdef api object PySlepcNEP_New(SlepcNEP arg):
 *     cdef NEP retv = NEP()             # <<<<<<<<<<<<<<
 *     setref(&retv.nep, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcNEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":136
 * cdef api object PySlepcNEP_New(SlepcNEP arg):
 *     cdef NEP retv = NEP()
 *     setref(&retv.nep, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->nep), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 136, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":137
 *     cdef NEP retv = NEP()
 *     setref(&retv.nep, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":134
 * # -- NEP --
 * 
 * cdef api object PySlepcNEP_New(SlepcNEP arg):             # <<<<<<<<<<<<<<
 *     cdef NEP retv = NEP()
 *     setref(&retv.nep, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcNEP_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":139
 *     return retv
 * 
 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcNEP retv = NULL
 *     cdef NEP ob = <NEP?> arg
 */

static NEP __pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get(PyObject *__pyx_v_arg) {
  NEP __pyx_v_retv;
  struct PySlepcNEPObject *__pyx_v_ob = 0;
  NEP __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  NEP __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcNEP_Get", 0);

  /* "SLEPc/CAPI.pyx":140
 * 
 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL:
 *     cdef SlepcNEP retv = NULL             # <<<<<<<<<<<<<<
 *     cdef NEP ob = <NEP?> arg
 *     retv = ob.nep
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":141
 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL:
 *     cdef SlepcNEP retv = NULL
 *     cdef NEP ob = <NEP?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.nep
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_NEP)))) __PYX_ERR(18, 141, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcNEPObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":142
 *     cdef SlepcNEP retv = NULL
 *     cdef NEP ob = <NEP?> arg
 *     retv = ob.nep             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->nep;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":143
 *     cdef NEP ob = <NEP?> arg
 *     retv = ob.nep
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":139
 *     return retv
 * 
 * cdef api SlepcNEP PySlepcNEP_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcNEP retv = NULL
 *     cdef NEP ob = <NEP?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcNEP_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":149
 * # -- MFN --
 * 
 * cdef api object PySlepcMFN_New(SlepcMFN arg):             # <<<<<<<<<<<<<<
 *     cdef MFN retv = MFN()
 *     setref(&retv.mfn, arg)
 */

static PyObject *__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New(MFN __pyx_v_arg) {
  struct PySlepcMFNObject *__pyx_v_retv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcMFN_New", 0);

  /* "SLEPc/CAPI.pyx":150
 * 
 * cdef api object PySlepcMFN_New(SlepcMFN arg):
 *     cdef MFN retv = MFN()             # <<<<<<<<<<<<<<
 *     setref(&retv.mfn, arg)
 *     return retv
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_retv = ((struct PySlepcMFNObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":151
 * cdef api object PySlepcMFN_New(SlepcMFN arg):
 *     cdef MFN retv = MFN()
 *     setref(&retv.mfn, arg)             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_setref((&__pyx_v_retv->mfn), __pyx_v_arg); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(18, 151, __pyx_L1_error)

  /* "SLEPc/CAPI.pyx":152
 *     cdef MFN retv = MFN()
 *     setref(&retv.mfn, arg)
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_retv));
  __pyx_r = ((PyObject *)__pyx_v_retv);
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":149
 * # -- MFN --
 * 
 * cdef api object PySlepcMFN_New(SlepcMFN arg):             # <<<<<<<<<<<<<<
 *     cdef MFN retv = MFN()
 *     setref(&retv.mfn, arg)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcMFN_New", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_retv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/CAPI.pyx":154
 *     return retv
 * 
 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcMFN retv = NULL
 *     cdef MFN ob = <MFN?> arg
 */

static MFN __pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get(PyObject *__pyx_v_arg) {
  MFN __pyx_v_retv;
  struct PySlepcMFNObject *__pyx_v_ob = 0;
  MFN __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  MFN __pyx_t_2;
  __Pyx_RefNannySetupContext("PySlepcMFN_Get", 0);

  /* "SLEPc/CAPI.pyx":155
 * 
 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL:
 *     cdef SlepcMFN retv = NULL             # <<<<<<<<<<<<<<
 *     cdef MFN ob = <MFN?> arg
 *     retv = ob.mfn
 */
  __pyx_v_retv = NULL;

  /* "SLEPc/CAPI.pyx":156
 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL:
 *     cdef SlepcMFN retv = NULL
 *     cdef MFN ob = <MFN?> arg             # <<<<<<<<<<<<<<
 *     retv = ob.mfn
 *     return retv
 */
  if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_8slepc4py_5SLEPc_MFN)))) __PYX_ERR(18, 156, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_arg;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_ob = ((struct PySlepcMFNObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "SLEPc/CAPI.pyx":157
 *     cdef SlepcMFN retv = NULL
 *     cdef MFN ob = <MFN?> arg
 *     retv = ob.mfn             # <<<<<<<<<<<<<<
 *     return retv
 * 
 */
  __pyx_t_2 = __pyx_v_ob->mfn;
  __pyx_v_retv = __pyx_t_2;

  /* "SLEPc/CAPI.pyx":158
 *     cdef MFN ob = <MFN?> arg
 *     retv = ob.mfn
 *     return retv             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_r = __pyx_v_retv;
  goto __pyx_L0;

  /* "SLEPc/CAPI.pyx":154
 *     return retv
 * 
 * cdef api SlepcMFN PySlepcMFN_Get(object arg) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef SlepcMFN retv = NULL
 *     cdef MFN ob = <MFN?> arg
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("slepc4py.SLEPc.PySlepcMFN_Get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ob);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":171
 *     int fprintf(FILE *, char *, ...)
 * 
 * cdef int initialize(object args) except -1:             # <<<<<<<<<<<<<<
 *     if (<int>SlepcInitializeCalled): return 1
 *     # initialize SLEPC
 */

static int __pyx_f_8slepc4py_5SLEPc_initialize(CYTHON_UNUSED PyObject *__pyx_v_args) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("initialize", 0);

  /* "SLEPc/SLEPc.pyx":172
 * 
 * cdef int initialize(object args) except -1:
 *     if (<int>SlepcInitializeCalled): return 1             # <<<<<<<<<<<<<<
 *     # initialize SLEPC
 *     CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) )
 */
  __pyx_t_1 = (((int)SlepcInitializeCalled) != 0);
  if (__pyx_t_1) {
    __pyx_r = 1;
    goto __pyx_L0;
  }

  /* "SLEPc/SLEPc.pyx":174
 *     if (<int>SlepcInitializeCalled): return 1
 *     # initialize SLEPC
 *     CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) )             # <<<<<<<<<<<<<<
 *     # register finalization function
 *     if Py_AtExit(finalize) < 0:
 */
  __pyx_t_2 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcInitialize(NULL, NULL, NULL, NULL)); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(4, 174, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":176
 *     CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) )
 *     # register finalization function
 *     if Py_AtExit(finalize) < 0:             # <<<<<<<<<<<<<<
 *         PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()",
 *                           b"SlepcFinalize()")
 */
  __pyx_t_1 = ((Py_AtExit(__pyx_f_8slepc4py_5SLEPc_finalize) < 0) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":177
 *     # register finalization function
 *     if Py_AtExit(finalize) < 0:
 *         PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()",             # <<<<<<<<<<<<<<
 *                           b"SlepcFinalize()")
 *     return 1 # and we are done, enjoy !!
 */
    PySys_WriteStderr(((char *)"warning: could not register %s with Py_AtExit()"), ((char *)"SlepcFinalize()"));

    /* "SLEPc/SLEPc.pyx":176
 *     CHKERR( SlepcInitialize(NULL, NULL, NULL, NULL) )
 *     # register finalization function
 *     if Py_AtExit(finalize) < 0:             # <<<<<<<<<<<<<<
 *         PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()",
 *                           b"SlepcFinalize()")
 */
  }

  /* "SLEPc/SLEPc.pyx":179
 *         PySys_WriteStderr(b"warning: could not register %s with Py_AtExit()",
 *                           b"SlepcFinalize()")
 *     return 1 # and we are done, enjoy !!             # <<<<<<<<<<<<<<
 * 
 * from petsc4py.PETSc cimport PyPetscType_Register
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":171
 *     int fprintf(FILE *, char *, ...)
 * 
 * cdef int initialize(object args) except -1:             # <<<<<<<<<<<<<<
 *     if (<int>SlepcInitializeCalled): return 1
 *     # initialize SLEPC
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":197
 *     PetscClassId SLEPC_MFN_CLASSID "MFN_CLASSID"
 * 
 * cdef int register(char path[]) except -1:             # <<<<<<<<<<<<<<
 *     # make sure all SLEPc packages are initialized
 *     CHKERR( SlepcInitializePackageAll() )
 */

static int __pyx_f_8slepc4py_5SLEPc_register(CYTHON_UNUSED char *__pyx_v_path) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("register", 0);

  /* "SLEPc/SLEPc.pyx":199
 * cdef int register(char path[]) except -1:
 *     # make sure all SLEPc packages are initialized
 *     CHKERR( SlepcInitializePackageAll() )             # <<<<<<<<<<<<<<
 *     # register Python types
 *     PyPetscType_Register(SLEPC_ST_CLASSID,  ST)
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_CHKERR(SlepcInitializePackageAll()); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 199, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":201
 *     CHKERR( SlepcInitializePackageAll() )
 *     # register Python types
 *     PyPetscType_Register(SLEPC_ST_CLASSID,  ST)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_BV_CLASSID,  BV)
 *     PyPetscType_Register(SLEPC_DS_CLASSID,  DS)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(ST_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_ST); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 201, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":202
 *     # register Python types
 *     PyPetscType_Register(SLEPC_ST_CLASSID,  ST)
 *     PyPetscType_Register(SLEPC_BV_CLASSID,  BV)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_DS_CLASSID,  DS)
 *     PyPetscType_Register(SLEPC_FN_CLASSID,  FN)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(BV_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_BV); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 202, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":203
 *     PyPetscType_Register(SLEPC_ST_CLASSID,  ST)
 *     PyPetscType_Register(SLEPC_BV_CLASSID,  BV)
 *     PyPetscType_Register(SLEPC_DS_CLASSID,  DS)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_FN_CLASSID,  FN)
 *     PyPetscType_Register(SLEPC_RG_CLASSID,  RG)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(DS_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_DS); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 203, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":204
 *     PyPetscType_Register(SLEPC_BV_CLASSID,  BV)
 *     PyPetscType_Register(SLEPC_DS_CLASSID,  DS)
 *     PyPetscType_Register(SLEPC_FN_CLASSID,  FN)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_RG_CLASSID,  RG)
 *     PyPetscType_Register(SLEPC_EPS_CLASSID, EPS)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(FN_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_FN); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 204, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":205
 *     PyPetscType_Register(SLEPC_DS_CLASSID,  DS)
 *     PyPetscType_Register(SLEPC_FN_CLASSID,  FN)
 *     PyPetscType_Register(SLEPC_RG_CLASSID,  RG)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_EPS_CLASSID, EPS)
 *     PyPetscType_Register(SLEPC_SVD_CLASSID, SVD)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(RG_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_RG); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 205, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":206
 *     PyPetscType_Register(SLEPC_FN_CLASSID,  FN)
 *     PyPetscType_Register(SLEPC_RG_CLASSID,  RG)
 *     PyPetscType_Register(SLEPC_EPS_CLASSID, EPS)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_SVD_CLASSID, SVD)
 *     PyPetscType_Register(SLEPC_PEP_CLASSID, PEP)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(EPS_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_EPS); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 206, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":207
 *     PyPetscType_Register(SLEPC_RG_CLASSID,  RG)
 *     PyPetscType_Register(SLEPC_EPS_CLASSID, EPS)
 *     PyPetscType_Register(SLEPC_SVD_CLASSID, SVD)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_PEP_CLASSID, PEP)
 *     PyPetscType_Register(SLEPC_NEP_CLASSID, NEP)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(SVD_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_SVD); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 207, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":208
 *     PyPetscType_Register(SLEPC_EPS_CLASSID, EPS)
 *     PyPetscType_Register(SLEPC_SVD_CLASSID, SVD)
 *     PyPetscType_Register(SLEPC_PEP_CLASSID, PEP)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_NEP_CLASSID, NEP)
 *     PyPetscType_Register(SLEPC_MFN_CLASSID, MFN)
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(PEP_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_PEP); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 208, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":209
 *     PyPetscType_Register(SLEPC_SVD_CLASSID, SVD)
 *     PyPetscType_Register(SLEPC_PEP_CLASSID, PEP)
 *     PyPetscType_Register(SLEPC_NEP_CLASSID, NEP)             # <<<<<<<<<<<<<<
 *     PyPetscType_Register(SLEPC_MFN_CLASSID, MFN)
 *     return 0
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(NEP_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_NEP); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 209, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":210
 *     PyPetscType_Register(SLEPC_PEP_CLASSID, PEP)
 *     PyPetscType_Register(SLEPC_NEP_CLASSID, NEP)
 *     PyPetscType_Register(SLEPC_MFN_CLASSID, MFN)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  __pyx_t_1 = __pyx_f_8petsc4py_5PETSc_PyPetscType_Register(MFN_CLASSID, __pyx_ptype_8slepc4py_5SLEPc_MFN); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 210, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":211
 *     PyPetscType_Register(SLEPC_NEP_CLASSID, NEP)
 *     PyPetscType_Register(SLEPC_MFN_CLASSID, MFN)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cdef void finalize() nogil:
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "SLEPc/SLEPc.pyx":197
 *     PetscClassId SLEPC_MFN_CLASSID "MFN_CLASSID"
 * 
 * cdef int register(char path[]) except -1:             # <<<<<<<<<<<<<<
 *     # make sure all SLEPc packages are initialized
 *     CHKERR( SlepcInitializePackageAll() )
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc.register", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":213
 *     return 0
 * 
 * cdef void finalize() nogil:             # <<<<<<<<<<<<<<
 *     # finalize SLEPc
 *     cdef int ierr = 0
 */

static void __pyx_f_8slepc4py_5SLEPc_finalize(void) {
  int __pyx_v_ierr;
  int __pyx_t_1;

  /* "SLEPc/SLEPc.pyx":215
 * cdef void finalize() nogil:
 *     # finalize SLEPc
 *     cdef int ierr = 0             # <<<<<<<<<<<<<<
 *     ierr = SlepcFinalize()
 *     if ierr != 0:
 */
  __pyx_v_ierr = 0;

  /* "SLEPc/SLEPc.pyx":216
 *     # finalize SLEPc
 *     cdef int ierr = 0
 *     ierr = SlepcFinalize()             # <<<<<<<<<<<<<<
 *     if ierr != 0:
 *         fprintf(stderr, "SlepcFinalize() failed "
 */
  __pyx_v_ierr = SlepcFinalize();

  /* "SLEPc/SLEPc.pyx":217
 *     cdef int ierr = 0
 *     ierr = SlepcFinalize()
 *     if ierr != 0:             # <<<<<<<<<<<<<<
 *         fprintf(stderr, "SlepcFinalize() failed "
 *                 "[error code: %d]\n", ierr)
 */
  __pyx_t_1 = ((__pyx_v_ierr != 0) != 0);
  if (__pyx_t_1) {

    /* "SLEPc/SLEPc.pyx":218
 *     ierr = SlepcFinalize()
 *     if ierr != 0:
 *         fprintf(stderr, "SlepcFinalize() failed "             # <<<<<<<<<<<<<<
 *                 "[error code: %d]\n", ierr)
 *     # and we are done, see you later !!
 */
    fprintf(stderr, ((char *)"SlepcFinalize() failed [error code: %d]\n"), __pyx_v_ierr);

    /* "SLEPc/SLEPc.pyx":217
 *     cdef int ierr = 0
 *     ierr = SlepcFinalize()
 *     if ierr != 0:             # <<<<<<<<<<<<<<
 *         fprintf(stderr, "SlepcFinalize() failed "
 *                 "[error code: %d]\n", ierr)
 */
  }

  /* "SLEPc/SLEPc.pyx":213
 *     return 0
 * 
 * cdef void finalize() nogil:             # <<<<<<<<<<<<<<
 *     # finalize SLEPc
 *     cdef int ierr = 0
 */

  /* function exit code */
}

/* "SLEPc/SLEPc.pyx":224
 * # -----------------------------------------------------------------------------
 * 
 * def _initialize(args=None):             # <<<<<<<<<<<<<<
 *     cdef int ready = initialize(args)
 *     if ready: register(NULL)
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_1_initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc__initialize[] = "_initialize(args=None)";
static PyMethodDef __pyx_mdef_8slepc4py_5SLEPc_1_initialize = {"_initialize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_1_initialize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc__initialize};
static PyObject *__pyx_pw_8slepc4py_5SLEPc_1_initialize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_args = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_initialize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,0};
    PyObject* values[1] = {0};
    values[0] = ((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  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_initialize") < 0)) __PYX_ERR(4, 224, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_args = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_initialize", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 224, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc._initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc__initialize(__pyx_self, __pyx_v_args);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc__initialize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
  int __pyx_v_ready;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("_initialize", 0);

  /* "SLEPc/SLEPc.pyx":225
 * 
 * def _initialize(args=None):
 *     cdef int ready = initialize(args)             # <<<<<<<<<<<<<<
 *     if ready: register(NULL)
 * 
 */
  __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_initialize(__pyx_v_args); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 225, __pyx_L1_error)
  __pyx_v_ready = __pyx_t_1;

  /* "SLEPc/SLEPc.pyx":226
 * def _initialize(args=None):
 *     cdef int ready = initialize(args)
 *     if ready: register(NULL)             # <<<<<<<<<<<<<<
 * 
 * def _finalize():
 */
  __pyx_t_2 = (__pyx_v_ready != 0);
  if (__pyx_t_2) {
    __pyx_t_1 = __pyx_f_8slepc4py_5SLEPc_register(NULL); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(4, 226, __pyx_L1_error)
  }

  /* "SLEPc/SLEPc.pyx":224
 * # -----------------------------------------------------------------------------
 * 
 * def _initialize(args=None):             # <<<<<<<<<<<<<<
 *     cdef int ready = initialize(args)
 *     if ready: register(NULL)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("slepc4py.SLEPc._initialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "SLEPc/SLEPc.pyx":228
 *     if ready: register(NULL)
 * 
 * def _finalize():             # <<<<<<<<<<<<<<
 *     finalize()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3_finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_8slepc4py_5SLEPc_2_finalize[] = "_finalize()";
static PyMethodDef __pyx_mdef_8slepc4py_5SLEPc_3_finalize = {"_finalize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3_finalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2_finalize};
static PyObject *__pyx_pw_8slepc4py_5SLEPc_3_finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_finalize (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("_finalize", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_finalize", 0))) return NULL;
  __pyx_r = __pyx_pf_8slepc4py_5SLEPc_2_finalize(__pyx_self);

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

static PyObject *__pyx_pf_8slepc4py_5SLEPc_2_finalize(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_finalize", 0);

  /* "SLEPc/SLEPc.pyx":229
 * 
 * def _finalize():
 *     finalize()             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_f_8slepc4py_5SLEPc_finalize();

  /* "SLEPc/SLEPc.pyx":228
 *     if ready: register(NULL)
 * 
 * def _finalize():             # <<<<<<<<<<<<<<
 *     finalize()
 * 
 */

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

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_ST(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcSTObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcSTObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_ST;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2ST_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_ST(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_ST);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_ST(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_ST)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_ST(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_ST);
  return 0;
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_shift(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_2ST_shift(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_2ST_5shift_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_mat_mode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_2ST_mat_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_2ST_8mat_mode_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_2ST_ksp(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_2ST_ksp(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_2ST_3ksp_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_ST[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_12getType},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_14setOptionsPrefix},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_16getOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_18setFromOptions},
  {"setShift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_21setShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_20setShift},
  {"getShift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_23getShift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_22getShift},
  {"setTransform", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_25setTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_24setTransform},
  {"getTransform", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_27getTransform, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_26getTransform},
  {"setMatMode", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_29setMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_28setMatMode},
  {"getMatMode", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_31getMatMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_30getMatMode},
  {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_33setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_32setOperators},
  {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_35getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_34getOperators},
  {"setMatStructure", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_37setMatStructure, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_36setMatStructure},
  {"setKSP", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_39setKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_38setKSP},
  {"getKSP", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_41getKSP, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_40getKSP},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_43setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_42setUp},
  {"apply", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_45apply, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_44apply},
  {"applyTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_47applyTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_46applyTranspose},
  {"setCayleyAntishift", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2ST_49setCayleyAntishift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2ST_48setCayleyAntishift},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_ST[] = {
  {(char *)"shift", __pyx_getprop_8slepc4py_5SLEPc_2ST_shift, __pyx_setprop_8slepc4py_5SLEPc_2ST_shift, (char *)0, 0},
  {(char *)"mat_mode", __pyx_getprop_8slepc4py_5SLEPc_2ST_mat_mode, __pyx_setprop_8slepc4py_5SLEPc_2ST_mat_mode, (char *)0, 0},
  {(char *)"ksp", __pyx_getprop_8slepc4py_5SLEPc_2ST_ksp, __pyx_setprop_8slepc4py_5SLEPc_2ST_ksp, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcST_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.ST", /*tp_name*/
  sizeof(struct PySlepcSTObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_ST, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    ST\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_ST, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_ST, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_ST, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8slepc4py_5SLEPc_ST, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_ST, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_BV __pyx_vtable_8slepc4py_5SLEPc_BV;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_BV(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcBVObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcBVObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_BV;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2BV_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_BV(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_BV);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_BV(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_BV)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_BV(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_BV);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_BV[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_4destroy},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_6create},
  {"duplicate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_9duplicate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_8duplicate},
  {"copy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_11copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_10copy},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_13setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_12setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_15getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_14getType},
  {"setSizes", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_17setSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_16setSizes},
  {"setSizesFromVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_19setSizesFromVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_18setSizesFromVec},
  {"getSizes", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_21getSizes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_20getSizes},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_23setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_22setOptionsPrefix},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_25getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_24getOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_27setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_26setFromOptions},
  {"getOrthogonalization", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_29getOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_28getOrthogonalization},
  {"setOrthogonalization", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_31setOrthogonalization, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_30setOrthogonalization},
  {"getMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_33getMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_32getMatrix},
  {"setMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_35setMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_34setMatrix},
  {"applyMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_37applyMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_36applyMatrix},
  {"setActiveColumns", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_39setActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_38setActiveColumns},
  {"getActiveColumns", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_41getActiveColumns, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_40getActiveColumns},
  {"scaleColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_43scaleColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_42scaleColumn},
  {"scale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_45scale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_44scale},
  {"insertVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_47insertVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_46insertVec},
  {"insertVecs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_49insertVecs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_48insertVecs},
  {"dotVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_51dotVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_50dotVec},
  {"getColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_53getColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_52getColumn},
  {"restoreColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_55restoreColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_54restoreColumn},
  {"dot", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_57dot, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_56dot},
  {"matProject", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_59matProject, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_58matProject},
  {"matMult", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_61matMult, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_60matMult},
  {"matMultHermitianTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_63matMultHermitianTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_62matMultHermitianTranspose},
  {"multVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_65multVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_64multVec},
  {"normColumn", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_67normColumn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_66normColumn},
  {"norm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_69norm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_68norm},
  {"setRandom", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_71setRandom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_70setRandom},
  {"orthogonalizeVec", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_73orthogonalizeVec, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_72orthogonalizeVec},
  {"orthogonalize", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2BV_75orthogonalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2BV_74orthogonalize},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcBV_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.BV", /*tp_name*/
  sizeof(struct PySlepcBVObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_BV, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    BV\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_BV, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_BV, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_BV, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_BV, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_DS __pyx_vtable_8slepc4py_5SLEPc_DS;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_DS(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcDSObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcDSObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_DS;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2DS_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_DS(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_DS);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_DS(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_DS)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_DS(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_DS);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_DS[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_12getType},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_15setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_14setOptionsPrefix},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_17getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_16getOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_19setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_18setFromOptions},
  {"allocate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_21allocate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_20allocate},
  {"getLeadingDimension", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_23getLeadingDimension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_22getLeadingDimension},
  {"setState", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_25setState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_24setState},
  {"getState", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_27getState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_26getState},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_28setDimensions},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_31getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_30getDimensions},
  {"setMethod", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_33setMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_32setMethod},
  {"getMethod", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_35getMethod, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_34getMethod},
  {"setCompact", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_37setCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_36setCompact},
  {"getCompact", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_39getCompact, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_38getCompact},
  {"setExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_41setExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_40setExtraRow},
  {"getExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_43getExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_42getExtraRow},
  {"setRefined", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_45setRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_44setRefined},
  {"getRefined", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_47getRefined, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_46getRefined},
  {"truncate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_49truncate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_48truncate},
  {"updateExtraRow", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2DS_51updateExtraRow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2DS_50updateExtraRow},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcDS_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.DS", /*tp_name*/
  sizeof(struct PySlepcDSObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_DS, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    DS\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_DS, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_DS, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_DS, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_DS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_FN __pyx_vtable_8slepc4py_5SLEPc_FN;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_FN(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcFNObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcFNObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_FN;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2FN_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_FN(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_FN);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_FN(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_FN)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_FN(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_FN);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_FN[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_4destroy},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_6create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_8setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_10getType},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_12setOptionsPrefix},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_14getOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_16setFromOptions},
  {"evaluateFunction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_19evaluateFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_18evaluateFunction},
  {"evaluateDerivative", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_21evaluateDerivative, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_20evaluateDerivative},
  {"setScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_23setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_22setScale},
  {"getScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_25getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_24getScale},
  {"setRationalNumerator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_27setRationalNumerator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_26setRationalNumerator},
  {"setRationalDenominator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2FN_29setRationalDenominator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2FN_28setRationalDenominator},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcFN_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.FN", /*tp_name*/
  sizeof(struct PySlepcFNObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_FN, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    FN\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_FN, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_FN, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_FN, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_FN, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_RG __pyx_vtable_8slepc4py_5SLEPc_RG;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_RG(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcRGObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcRGObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_RG;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_2RG_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_RG(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_RG);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_RG(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_RG)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_RG(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_RG);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_RG[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_4destroy},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_7create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_6create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_9setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_8setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_11getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_10getType},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_13setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_12setOptionsPrefix},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_14getOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_17setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_16setFromOptions},
  {"isTrivial", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_19isTrivial, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_18isTrivial},
  {"getComplement", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_21getComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_20getComplement},
  {"setComplement", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_23setComplement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_22setComplement},
  {"setEllipseParameters", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_25setEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_24setEllipseParameters},
  {"getEllipseParameters", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_27getEllipseParameters, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_26getEllipseParameters},
  {"setIntervalEndpoints", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_29setIntervalEndpoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_28setIntervalEndpoints},
  {"getIntervalEndpoints", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_2RG_31getIntervalEndpoints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_2RG_30getIntervalEndpoints},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcRG_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.RG", /*tp_name*/
  sizeof(struct PySlepcRGObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_RG, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    RG\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_RG, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_RG, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_RG, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_RG, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_EPS __pyx_vtable_8slepc4py_5SLEPc_EPS;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_EPS(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcEPSObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcEPSObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_EPS;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3EPS_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_EPS(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_EPS)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_EPS(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_EPS);
  return 0;
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_problem_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_problem_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_12problem_type_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_extraction(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_extraction(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_10extraction_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_which(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_which(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_5which_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_target(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_6target_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_tol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_tol(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_3tol_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_max_it(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_max_it(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_6max_it_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_st(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_st(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_2st_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3EPS_bv(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3EPS_bv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3EPS_2bv_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_EPS[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_12getType},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_14getOptionsPrefix},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_16setOptionsPrefix},
  {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_18appendOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_20setFromOptions},
  {"getProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_23getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_22getProblemType},
  {"setProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_25setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_24setProblemType},
  {"isGeneralized", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_27isGeneralized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_26isGeneralized},
  {"isHermitian", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_29isHermitian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_28isHermitian},
  {"isPositive", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_31isPositive, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_30isPositive},
  {"getBalance", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_33getBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_32getBalance},
  {"setBalance", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_35setBalance, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_34setBalance},
  {"getExtraction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_37getExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_36getExtraction},
  {"setExtraction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_39setExtraction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_38setExtraction},
  {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_41getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_40getWhichEigenpairs},
  {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_43setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_42setWhichEigenpairs},
  {"getTarget", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_45getTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_44getTarget},
  {"setTarget", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_47setTarget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_46setTarget},
  {"getInterval", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_49getInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_48getInterval},
  {"setInterval", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_51setInterval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_50setInterval},
  {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_53getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_52getTolerances},
  {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_55setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_54setTolerances},
  {"getConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_57getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_56getConvergenceTest},
  {"setConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_59setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_58setConvergenceTest},
  {"getTrueResidual", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_61getTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_60getTrueResidual},
  {"setTrueResidual", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_63setTrueResidual, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_62setTrueResidual},
  {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_65getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_64getTrackAll},
  {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_67setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_66setTrackAll},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_69getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_68getDimensions},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_71setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_70setDimensions},
  {"getST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_73getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_72getST},
  {"setST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_75setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_74setST},
  {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_77getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_76getBV},
  {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_79setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_78setBV},
  {"getDS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_81getDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_80getDS},
  {"setDS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_83setDS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_82setDS},
  {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_85getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_84getRG},
  {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_87setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_86setRG},
  {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_89getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_88getOperators},
  {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_91setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_90setOperators},
  {"setDeflationSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_93setDeflationSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_92setDeflationSpace},
  {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_95setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_94setInitialSpace},
  {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_97cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_96cancelMonitor},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_99setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_98setUp},
  {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_101solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_100solve},
  {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_103getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_102getIterationNumber},
  {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_105getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_104getConvergedReason},
  {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_107getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_106getConverged},
  {"getEigenvalue", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_109getEigenvalue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_108getEigenvalue},
  {"getEigenvector", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_111getEigenvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_110getEigenvector},
  {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_113getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_112getEigenpair},
  {"getInvariantSubspace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_115getInvariantSubspace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_114getInvariantSubspace},
  {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_117getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_116getErrorEstimate},
  {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_119computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_118computeError},
  {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_121errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_120errorView},
  {"setPowerShiftType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_123setPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_122setPowerShiftType},
  {"getPowerShiftType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_125getPowerShiftType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_124getPowerShiftType},
  {"setArnoldiDelayed", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_127setArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_126setArnoldiDelayed},
  {"getArnoldiDelayed", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_129getArnoldiDelayed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_128getArnoldiDelayed},
  {"setLanczosReorthogType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_131setLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_130setLanczosReorthogType},
  {"getLanczosReorthogType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_133getLanczosReorthogType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_132getLanczosReorthogType},
  {"setKrylovSchurRestart", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_135setKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_134setKrylovSchurRestart},
  {"getKrylovSchurRestart", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_137getKrylovSchurRestart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_136getKrylovSchurRestart},
  {"setKrylovSchurLocking", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_139setKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_138setKrylovSchurLocking},
  {"getKrylovSchurLocking", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_141getKrylovSchurLocking, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_140getKrylovSchurLocking},
  {"setKrylovSchurPartitions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_143setKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_142setKrylovSchurPartitions},
  {"getKrylovSchurPartitions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_145getKrylovSchurPartitions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_144getKrylovSchurPartitions},
  {"setKrylovSchurDetectZeros", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_147setKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_146setKrylovSchurDetectZeros},
  {"getKrylovSchurDetectZeros", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_149getKrylovSchurDetectZeros, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_148getKrylovSchurDetectZeros},
  {"setKrylovSchurDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_151setKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_150setKrylovSchurDimensions},
  {"getKrylovSchurDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_153getKrylovSchurDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_152getKrylovSchurDimensions},
  {"getKrylovSchurSubcommInfo", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_155getKrylovSchurSubcommInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_154getKrylovSchurSubcommInfo},
  {"getKrylovSchurSubcommPairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_157getKrylovSchurSubcommPairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_156getKrylovSchurSubcommPairs},
  {"getKrylovSchurSubcommMats", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_159getKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_158getKrylovSchurSubcommMats},
  {"updateKrylovSchurSubcommMats", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_161updateKrylovSchurSubcommMats, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_160updateKrylovSchurSubcommMats},
  {"setKrylovSchurSubintervals", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_163setKrylovSchurSubintervals, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_162setKrylovSchurSubintervals},
  {"setRQCGReset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_165setRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_164setRQCGReset},
  {"getRQCGReset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3EPS_167getRQCGReset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3EPS_166getRQCGReset},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_EPS[] = {
  {(char *)"problem_type", __pyx_getprop_8slepc4py_5SLEPc_3EPS_problem_type, __pyx_setprop_8slepc4py_5SLEPc_3EPS_problem_type, (char *)0, 0},
  {(char *)"extraction", __pyx_getprop_8slepc4py_5SLEPc_3EPS_extraction, __pyx_setprop_8slepc4py_5SLEPc_3EPS_extraction, (char *)0, 0},
  {(char *)"which", __pyx_getprop_8slepc4py_5SLEPc_3EPS_which, __pyx_setprop_8slepc4py_5SLEPc_3EPS_which, (char *)0, 0},
  {(char *)"target", __pyx_getprop_8slepc4py_5SLEPc_3EPS_target, __pyx_setprop_8slepc4py_5SLEPc_3EPS_target, (char *)0, 0},
  {(char *)"tol", __pyx_getprop_8slepc4py_5SLEPc_3EPS_tol, __pyx_setprop_8slepc4py_5SLEPc_3EPS_tol, (char *)0, 0},
  {(char *)"max_it", __pyx_getprop_8slepc4py_5SLEPc_3EPS_max_it, __pyx_setprop_8slepc4py_5SLEPc_3EPS_max_it, (char *)0, 0},
  {(char *)"st", __pyx_getprop_8slepc4py_5SLEPc_3EPS_st, __pyx_setprop_8slepc4py_5SLEPc_3EPS_st, (char *)0, 0},
  {(char *)"bv", __pyx_getprop_8slepc4py_5SLEPc_3EPS_bv, __pyx_setprop_8slepc4py_5SLEPc_3EPS_bv, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcEPS_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.EPS", /*tp_name*/
  sizeof(struct PySlepcEPSObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_EPS, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    EPS\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_EPS, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_EPS, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_EPS, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8slepc4py_5SLEPc_EPS, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_EPS, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_SVD __pyx_vtable_8slepc4py_5SLEPc_SVD;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_SVD(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcSVDObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcSVDObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_SVD;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3SVD_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_SVD(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_SVD)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_SVD(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_SVD);
  return 0;
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_transpose_mode(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_transpose_mode(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3SVD_14transpose_mode_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_which(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_which(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3SVD_5which_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_tol(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_tol(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3SVD_3tol_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_max_it(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_max_it(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3SVD_6max_it_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_8slepc4py_5SLEPc_3SVD_bv(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_1__get__(o);
}

static int __pyx_setprop_8slepc4py_5SLEPc_3SVD_bv(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_8slepc4py_5SLEPc_3SVD_2bv_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_SVD[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_12getType},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_14getOptionsPrefix},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_16setOptionsPrefix},
  {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_18appendOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_20setFromOptions},
  {"getImplicitTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_23getImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_22getImplicitTranspose},
  {"setImplicitTranspose", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_25setImplicitTranspose, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_24setImplicitTranspose},
  {"getWhichSingularTriplets", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_27getWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_26getWhichSingularTriplets},
  {"setWhichSingularTriplets", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_29setWhichSingularTriplets, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_28setWhichSingularTriplets},
  {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_31getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_30getTolerances},
  {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_33setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_32setTolerances},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_35getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_34getDimensions},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_37setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_36setDimensions},
  {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_39getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_38getBV},
  {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_41setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_40setBV},
  {"getOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_43getOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_42getOperator},
  {"setOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_45setOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_44setOperator},
  {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_47setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_46setInitialSpace},
  {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_49cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_48cancelMonitor},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_51setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_50setUp},
  {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_53solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_52solve},
  {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_55getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_54getIterationNumber},
  {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_57getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_56getConvergedReason},
  {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_59getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_58getConverged},
  {"getValue", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_61getValue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_60getValue},
  {"getVectors", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_63getVectors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_62getVectors},
  {"getSingularTriplet", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_65getSingularTriplet, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_64getSingularTriplet},
  {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_67computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_66computeError},
  {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_69errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_68errorView},
  {"setCrossEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_71setCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_70setCrossEPS},
  {"getCrossEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_73getCrossEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_72getCrossEPS},
  {"setCyclicEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_75setCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_74setCyclicEPS},
  {"getCyclicEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_77getCyclicEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_76getCyclicEPS},
  {"setCyclicExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_79setCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_78setCyclicExplicitMatrix},
  {"getCyclicExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_81getCyclicExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_80getCyclicExplicitMatrix},
  {"setLanczosOneSide", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_83setLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_82setLanczosOneSide},
  {"setTRLanczosOneSide", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3SVD_85setTRLanczosOneSide, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3SVD_84setTRLanczosOneSide},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_8slepc4py_5SLEPc_SVD[] = {
  {(char *)"transpose_mode", __pyx_getprop_8slepc4py_5SLEPc_3SVD_transpose_mode, __pyx_setprop_8slepc4py_5SLEPc_3SVD_transpose_mode, (char *)0, 0},
  {(char *)"which", __pyx_getprop_8slepc4py_5SLEPc_3SVD_which, __pyx_setprop_8slepc4py_5SLEPc_3SVD_which, (char *)0, 0},
  {(char *)"tol", __pyx_getprop_8slepc4py_5SLEPc_3SVD_tol, __pyx_setprop_8slepc4py_5SLEPc_3SVD_tol, (char *)0, 0},
  {(char *)"max_it", __pyx_getprop_8slepc4py_5SLEPc_3SVD_max_it, __pyx_setprop_8slepc4py_5SLEPc_3SVD_max_it, (char *)0, 0},
  {(char *)"bv", __pyx_getprop_8slepc4py_5SLEPc_3SVD_bv, __pyx_setprop_8slepc4py_5SLEPc_3SVD_bv, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcSVD_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.SVD", /*tp_name*/
  sizeof(struct PySlepcSVDObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_SVD, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    SVD\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_SVD, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_SVD, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_SVD, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_8slepc4py_5SLEPc_SVD, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_SVD, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_PEP __pyx_vtable_8slepc4py_5SLEPc_PEP;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_PEP(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcPEPObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcPEPObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_PEP;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3PEP_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_PEP(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_PEP)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_PEP(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_PEP);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_PEP[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_12getType},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_14getOptionsPrefix},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_16setOptionsPrefix},
  {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_18appendOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_20setFromOptions},
  {"getBasis", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_23getBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_22getBasis},
  {"setBasis", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_25setBasis, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_24setBasis},
  {"getProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_27getProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_26getProblemType},
  {"setProblemType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_29setProblemType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_28setProblemType},
  {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_31getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_30getWhichEigenpairs},
  {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_33setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_32setWhichEigenpairs},
  {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_35getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_34getTolerances},
  {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_37setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_36setTolerances},
  {"getConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_39getConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_38getConvergenceTest},
  {"setConvergenceTest", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_41setConvergenceTest, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_40setConvergenceTest},
  {"getRefine", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_43getRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_42getRefine},
  {"setRefine", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_45setRefine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_44setRefine},
  {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_47getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_46getTrackAll},
  {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_49setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_48setTrackAll},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_51getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_50getDimensions},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_53setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_52setDimensions},
  {"getST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_55getST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_54getST},
  {"setST", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_57setST, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_56setST},
  {"getScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_59getScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_58getScale},
  {"setScale", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_61setScale, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_60setScale},
  {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_63getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_62getBV},
  {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_65setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_64setBV},
  {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_67getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_66getRG},
  {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_69setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_68setRG},
  {"getOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_71getOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_70getOperators},
  {"setOperators", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_73setOperators, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_72setOperators},
  {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_75setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_74setInitialSpace},
  {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_77cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_76cancelMonitor},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_79setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_78setUp},
  {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_81solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_80solve},
  {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_83getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_82getIterationNumber},
  {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_85getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_84getConvergedReason},
  {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_87getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_86getConverged},
  {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_89getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_88getEigenpair},
  {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_91getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_90getErrorEstimate},
  {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_93computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_92computeError},
  {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_95errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_94errorView},
  {"setLinearEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_97setLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_96setLinearEPS},
  {"getLinearEPS", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_99getLinearEPS, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_98getLinearEPS},
  {"setLinearCompanionForm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_101setLinearCompanionForm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_100setLinearCompanionForm},
  {"getLinearCompanionForm", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_103getLinearCompanionForm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_102getLinearCompanionForm},
  {"setLinearExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_105setLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_104setLinearExplicitMatrix},
  {"getLinearExplicitMatrix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3PEP_107getLinearExplicitMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3PEP_106getLinearExplicitMatrix},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcPEP_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.PEP", /*tp_name*/
  sizeof(struct PySlepcPEPObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_PEP, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    PEP\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_PEP, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_PEP, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_PEP, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_PEP, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_NEP __pyx_vtable_8slepc4py_5SLEPc_NEP;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_NEP(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcNEPObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcNEPObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_NEP;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3NEP_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_NEP(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_NEP)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_NEP(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_NEP);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_NEP[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_12getType},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_14getOptionsPrefix},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_16setOptionsPrefix},
  {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_18appendOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_20setFromOptions},
  {"getWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_23getWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_22getWhichEigenpairs},
  {"setWhichEigenpairs", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_25setWhichEigenpairs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_24setWhichEigenpairs},
  {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_27getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_26getTolerances},
  {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_29setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_28setTolerances},
  {"getRIILagPreconditioner", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_31getRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_30getRIILagPreconditioner},
  {"setRIILagPreconditioner", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_33setRIILagPreconditioner, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_32setRIILagPreconditioner},
  {"getTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_35getTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_34getTrackAll},
  {"setTrackAll", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_37setTrackAll, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_36setTrackAll},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_39getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_38getDimensions},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_41setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_40setDimensions},
  {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_43getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_42getBV},
  {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_45setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_44setBV},
  {"getRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_47getRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_46getRG},
  {"setRG", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_49setRG, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_48setRG},
  {"setInitialSpace", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_51setInitialSpace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_50setInitialSpace},
  {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_53cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_52cancelMonitor},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_55setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_54setUp},
  {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_57solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_56solve},
  {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_59getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_58getIterationNumber},
  {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_61getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_60getConvergedReason},
  {"getConverged", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_63getConverged, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_62getConverged},
  {"getEigenpair", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_65getEigenpair, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_64getEigenpair},
  {"getErrorEstimate", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_67getErrorEstimate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_66getErrorEstimate},
  {"computeError", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_69computeError, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_68computeError},
  {"errorView", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_71errorView, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_70errorView},
  {"setFunction", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_73setFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_72setFunction},
  {"setJacobian", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_75setJacobian, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_74setJacobian},
  {"setSplitOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3NEP_77setSplitOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3NEP_76setSplitOperator},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcNEP_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.NEP", /*tp_name*/
  sizeof(struct PySlepcNEPObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_NEP, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    NEP\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_NEP, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_NEP, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_NEP, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_NEP, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_8slepc4py_5SLEPc_MFN __pyx_vtable_8slepc4py_5SLEPc_MFN;

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_MFN(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct PySlepcMFNObject *p;
  PyObject *o = __pyx_ptype_8petsc4py_5PETSc_Object->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct PySlepcMFNObject *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__pyx_vtabptr_8slepc4py_5SLEPc_MFN;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_3MFN_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) __pyx_ptype_8petsc4py_5PETSc_Object->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN);
}

static int __pyx_tp_traverse_8slepc4py_5SLEPc_MFN(PyObject *o, visitproc v, void *a) {
  int e;
  e = ((likely(__pyx_ptype_8petsc4py_5PETSc_Object)) ? ((__pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse) ? __pyx_ptype_8petsc4py_5PETSc_Object->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_8slepc4py_5SLEPc_MFN)); if (e) return e;
  return 0;
}

static int __pyx_tp_clear_8slepc4py_5SLEPc_MFN(PyObject *o) {
  if (likely(__pyx_ptype_8petsc4py_5PETSc_Object)) { if (__pyx_ptype_8petsc4py_5PETSc_Object->tp_clear) __pyx_ptype_8petsc4py_5PETSc_Object->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_8slepc4py_5SLEPc_MFN);
  return 0;
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_MFN[] = {
  {"view", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_3view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_2view},
  {"destroy", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_5destroy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_4destroy},
  {"reset", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_7reset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_6reset},
  {"create", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_9create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_8create},
  {"setType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_11setType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_10setType},
  {"getType", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_13getType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_12getType},
  {"getOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_15getOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_14getOptionsPrefix},
  {"setOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_17setOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_16setOptionsPrefix},
  {"appendOptionsPrefix", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_19appendOptionsPrefix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_18appendOptionsPrefix},
  {"setFromOptions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_21setFromOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_20setFromOptions},
  {"getTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_23getTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_22getTolerances},
  {"setTolerances", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_25setTolerances, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_24setTolerances},
  {"getDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_27getDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_26getDimensions},
  {"setDimensions", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_29setDimensions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_28setDimensions},
  {"getFN", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_31getFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_30getFN},
  {"setFN", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_33setFN, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_32setFN},
  {"getBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_35getBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_34getBV},
  {"setBV", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_37setBV, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_36setBV},
  {"getOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_39getOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_38getOperator},
  {"setOperator", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_41setOperator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_40setOperator},
  {"cancelMonitor", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_43cancelMonitor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_42cancelMonitor},
  {"setUp", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_45setUp, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_44setUp},
  {"solve", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_47solve, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_46solve},
  {"getIterationNumber", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_49getIterationNumber, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_48getIterationNumber},
  {"getConvergedReason", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3MFN_51getConvergedReason, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3MFN_50getConvergedReason},
  {0, 0, 0, 0}
};

DL_EXPORT(PyTypeObject) PySlepcMFN_Type = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.MFN", /*tp_name*/
  sizeof(struct PySlepcMFNObject), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_MFN, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "\n    MFN\n    ", /*tp_doc*/
  __pyx_tp_traverse_8slepc4py_5SLEPc_MFN, /*tp_traverse*/
  __pyx_tp_clear_8slepc4py_5SLEPc_MFN, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_MFN, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_MFN, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc__p_mem(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_8slepc4py_5SLEPc_6_p_mem_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc__p_mem(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_8slepc4py_5SLEPc_6_p_mem_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc__p_mem[] = {
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_8slepc4py_5SLEPc__p_mem = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc._p_mem", /*tp_name*/
  sizeof(struct __pyx_obj_8slepc4py_5SLEPc__p_mem), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc__p_mem, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc__p_mem, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc__p_mem, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_8slepc4py_5SLEPc_Sys(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_8slepc4py_5SLEPc_Sys(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_8slepc4py_5SLEPc_Sys[] = {
  {"getVersion", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3Sys_1getVersion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3Sys_getVersion},
  {"getVersionInfo", (PyCFunction)__pyx_pw_8slepc4py_5SLEPc_3Sys_3getVersionInfo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8slepc4py_5SLEPc_3Sys_2getVersionInfo},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_8slepc4py_5SLEPc_Sys = {
  PyVarObject_HEAD_INIT(0, 0)
  "slepc4py.SLEPc.Sys", /*tp_name*/
  sizeof(struct __pyx_obj_8slepc4py_5SLEPc_Sys), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_8slepc4py_5SLEPc_Sys, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_8slepc4py_5SLEPc_Sys, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_8slepc4py_5SLEPc_Sys, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "SLEPc",
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    (freefunc)__pyx_module_cleanup /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
  {&__pyx_n_s_ABS, __pyx_k_ABS, sizeof(__pyx_k_ABS), 0, 0, 1, 1},
  {&__pyx_n_s_ABSOLUTE, __pyx_k_ABSOLUTE, sizeof(__pyx_k_ABSOLUTE), 0, 0, 1, 1},
  {&__pyx_n_s_ADD, __pyx_k_ADD, sizeof(__pyx_k_ADD), 0, 0, 1, 1},
  {&__pyx_n_s_ALL, __pyx_k_ALL, sizeof(__pyx_k_ALL), 0, 0, 1, 1},
  {&__pyx_n_s_ALWAYS, __pyx_k_ALWAYS, sizeof(__pyx_k_ALWAYS), 0, 0, 1, 1},
  {&__pyx_n_s_ARNOLDI, __pyx_k_ARNOLDI, sizeof(__pyx_k_ARNOLDI), 0, 0, 1, 1},
  {&__pyx_n_s_ARPACK, __pyx_k_ARPACK, sizeof(__pyx_k_ARPACK), 0, 0, 1, 1},
  {&__pyx_n_s_Au, __pyx_k_Au, sizeof(__pyx_k_Au), 0, 0, 1, 1},
  {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
  {&__pyx_n_s_BACKWARD, __pyx_k_BACKWARD, sizeof(__pyx_k_BACKWARD), 0, 0, 1, 1},
  {&__pyx_n_s_BLOPEX, __pyx_k_BLOPEX, sizeof(__pyx_k_BLOPEX), 0, 0, 1, 1},
  {&__pyx_n_s_BLZPACK, __pyx_k_BLZPACK, sizeof(__pyx_k_BLZPACK), 0, 0, 1, 1},
  {&__pyx_n_s_BOTH, __pyx_k_BOTH, sizeof(__pyx_k_BOTH), 0, 0, 1, 1},
  {&__pyx_n_s_BVOrthogBlockType, __pyx_k_BVOrthogBlockType, sizeof(__pyx_k_BVOrthogBlockType), 0, 0, 1, 1},
  {&__pyx_n_s_BVOrthogRefineType, __pyx_k_BVOrthogRefineType, sizeof(__pyx_k_BVOrthogRefineType), 0, 0, 1, 1},
  {&__pyx_n_s_BVOrthogType, __pyx_k_BVOrthogType, sizeof(__pyx_k_BVOrthogType), 0, 0, 1, 1},
  {&__pyx_n_s_BVType, __pyx_k_BVType, sizeof(__pyx_k_BVType), 0, 0, 1, 1},
  {&__pyx_kp_s_BV_block_orthogonalization_type, __pyx_k_BV_block_orthogonalization_type, sizeof(__pyx_k_BV_block_orthogonalization_type), 0, 0, 1, 0},
  {&__pyx_kp_s_BV_orthogonalization_refinement, __pyx_k_BV_orthogonalization_refinement, sizeof(__pyx_k_BV_orthogonalization_refinement), 0, 0, 1, 0},
  {&__pyx_kp_s_BV_orthogonalization_types_CGS, __pyx_k_BV_orthogonalization_types_CGS, sizeof(__pyx_k_BV_orthogonalization_types_CGS), 0, 0, 1, 0},
  {&__pyx_kp_s_BV_type, __pyx_k_BV_type, sizeof(__pyx_k_BV_type), 0, 0, 1, 0},
  {&__pyx_n_s_Balance, __pyx_k_Balance, sizeof(__pyx_k_Balance), 0, 0, 1, 1},
  {&__pyx_n_s_Basis, __pyx_k_Basis, sizeof(__pyx_k_Basis), 0, 0, 1, 1},
  {&__pyx_n_s_BlockType, __pyx_k_BlockType, sizeof(__pyx_k_BlockType), 0, 0, 1, 1},
  {&__pyx_n_s_Bu, __pyx_k_Bu, sizeof(__pyx_k_Bu), 0, 0, 1, 1},
  {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
  {&__pyx_n_s_CAYLEY, __pyx_k_CAYLEY, sizeof(__pyx_k_CAYLEY), 0, 0, 1, 1},
  {&__pyx_n_s_CGS, __pyx_k_CGS, sizeof(__pyx_k_CGS), 0, 0, 1, 1},
  {&__pyx_n_s_CHEBYSHEV1, __pyx_k_CHEBYSHEV1, sizeof(__pyx_k_CHEBYSHEV1), 0, 0, 1, 1},
  {&__pyx_n_s_CHEBYSHEV2, __pyx_k_CHEBYSHEV2, sizeof(__pyx_k_CHEBYSHEV2), 0, 0, 1, 1},
  {&__pyx_n_s_CHOL, __pyx_k_CHOL, sizeof(__pyx_k_CHOL), 0, 0, 1, 1},
  {&__pyx_n_s_CISS, __pyx_k_CISS, sizeof(__pyx_k_CISS), 0, 0, 1, 1},
  {&__pyx_n_s_COMBINE, __pyx_k_COMBINE, sizeof(__pyx_k_COMBINE), 0, 0, 1, 1},
  {&__pyx_n_s_COMM_NULL, __pyx_k_COMM_NULL, sizeof(__pyx_k_COMM_NULL), 0, 0, 1, 1},
  {&__pyx_n_s_COMM_SELF, __pyx_k_COMM_SELF, sizeof(__pyx_k_COMM_SELF), 0, 0, 1, 1},
  {&__pyx_n_s_COMM_WORLD, __pyx_k_COMM_WORLD, sizeof(__pyx_k_COMM_WORLD), 0, 0, 1, 1},
  {&__pyx_n_s_COMPOSE, __pyx_k_COMPOSE, sizeof(__pyx_k_COMPOSE), 0, 0, 1, 1},
  {&__pyx_n_s_CONDENSED, __pyx_k_CONDENSED, sizeof(__pyx_k_CONDENSED), 0, 0, 1, 1},
  {&__pyx_n_s_CONSTANT, __pyx_k_CONSTANT, sizeof(__pyx_k_CONSTANT), 0, 0, 1, 1},
  {&__pyx_n_s_CONTIGUOUS, __pyx_k_CONTIGUOUS, sizeof(__pyx_k_CONTIGUOUS), 0, 0, 1, 1},
  {&__pyx_n_s_CONVERGED_ITERATING, __pyx_k_CONVERGED_ITERATING, sizeof(__pyx_k_CONVERGED_ITERATING), 0, 0, 1, 1},
  {&__pyx_n_s_CONVERGED_ITS, __pyx_k_CONVERGED_ITS, sizeof(__pyx_k_CONVERGED_ITS), 0, 0, 1, 1},
  {&__pyx_n_s_CONVERGED_TOL, __pyx_k_CONVERGED_TOL, sizeof(__pyx_k_CONVERGED_TOL), 0, 0, 1, 1},
  {&__pyx_n_s_CONVERGED_USER, __pyx_k_CONVERGED_USER, sizeof(__pyx_k_CONVERGED_USER), 0, 0, 1, 1},
  {&__pyx_n_s_COPY, __pyx_k_COPY, sizeof(__pyx_k_COPY), 0, 0, 1, 1},
  {&__pyx_n_s_CROSS, __pyx_k_CROSS, sizeof(__pyx_k_CROSS), 0, 0, 1, 1},
  {&__pyx_n_s_CYCLIC, __pyx_k_CYCLIC, sizeof(__pyx_k_CYCLIC), 0, 0, 1, 1},
  {&__pyx_n_s_CombineType, __pyx_k_CombineType, sizeof(__pyx_k_CombineType), 0, 0, 1, 1},
  {&__pyx_n_s_Conv, __pyx_k_Conv, sizeof(__pyx_k_Conv), 0, 0, 1, 1},
  {&__pyx_n_s_ConvergedReason, __pyx_k_ConvergedReason, sizeof(__pyx_k_ConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
  {&__pyx_n_s_DECIDE, __pyx_k_DECIDE, sizeof(__pyx_k_DECIDE), 0, 0, 1, 1},
  {&__pyx_n_s_DEFAULT, __pyx_k_DEFAULT, sizeof(__pyx_k_DEFAULT), 0, 0, 1, 1},
  {&__pyx_n_s_DELAYED, __pyx_k_DELAYED, sizeof(__pyx_k_DELAYED), 0, 0, 1, 1},
  {&__pyx_n_s_DETERMINE, __pyx_k_DETERMINE, sizeof(__pyx_k_DETERMINE), 0, 0, 1, 1},
  {&__pyx_n_s_DIAGONAL, __pyx_k_DIAGONAL, sizeof(__pyx_k_DIAGONAL), 0, 0, 1, 1},
  {&__pyx_n_s_DIVERGED_BREAKDOWN, __pyx_k_DIVERGED_BREAKDOWN, sizeof(__pyx_k_DIVERGED_BREAKDOWN), 0, 0, 1, 1},
  {&__pyx_n_s_DIVERGED_ITS, __pyx_k_DIVERGED_ITS, sizeof(__pyx_k_DIVERGED_ITS), 0, 0, 1, 1},
  {&__pyx_n_s_DIVERGED_LINEAR_SOLVE, __pyx_k_DIVERGED_LINEAR_SOLVE, sizeof(__pyx_k_DIVERGED_LINEAR_SOLVE), 0, 0, 1, 1},
  {&__pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_k_DIVERGED_SYMMETRY_LOST, sizeof(__pyx_k_DIVERGED_SYMMETRY_LOST), 0, 0, 1, 1},
  {&__pyx_n_s_DIVIDE, __pyx_k_DIVIDE, sizeof(__pyx_k_DIVIDE), 0, 0, 1, 1},
  {&__pyx_n_s_DSMatType, __pyx_k_DSMatType, sizeof(__pyx_k_DSMatType), 0, 0, 1, 1},
  {&__pyx_n_s_DSStateType, __pyx_k_DSStateType, sizeof(__pyx_k_DSStateType), 0, 0, 1, 1},
  {&__pyx_n_s_DSType, __pyx_k_DSType, sizeof(__pyx_k_DSType), 0, 0, 1, 1},
  {&__pyx_kp_s_DS_state_types_RAW_Not_processe, __pyx_k_DS_state_types_RAW_Not_processe, sizeof(__pyx_k_DS_state_types_RAW_Not_processe), 0, 0, 1, 0},
  {&__pyx_kp_s_DS_type, __pyx_k_DS_type, sizeof(__pyx_k_DS_type), 0, 0, 1, 0},
  {&__pyx_n_s_Dl, __pyx_k_Dl, sizeof(__pyx_k_Dl), 0, 0, 1, 1},
  {&__pyx_n_s_Dr, __pyx_k_Dr, sizeof(__pyx_k_Dr), 0, 0, 1, 1},
  {&__pyx_n_s_ELLIPSE, __pyx_k_ELLIPSE, sizeof(__pyx_k_ELLIPSE), 0, 0, 1, 1},
  {&__pyx_n_s_EPSBalance, __pyx_k_EPSBalance, sizeof(__pyx_k_EPSBalance), 0, 0, 1, 1},
  {&__pyx_n_s_EPSConv, __pyx_k_EPSConv, sizeof(__pyx_k_EPSConv), 0, 0, 1, 1},
  {&__pyx_n_s_EPSConvergedReason, __pyx_k_EPSConvergedReason, sizeof(__pyx_k_EPSConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_EPSErrorType, __pyx_k_EPSErrorType, sizeof(__pyx_k_EPSErrorType), 0, 0, 1, 1},
  {&__pyx_n_s_EPSExtraction, __pyx_k_EPSExtraction, sizeof(__pyx_k_EPSExtraction), 0, 0, 1, 1},
  {&__pyx_n_s_EPSLanczosReorthogType, __pyx_k_EPSLanczosReorthogType, sizeof(__pyx_k_EPSLanczosReorthogType), 0, 0, 1, 1},
  {&__pyx_n_s_EPSPowerShiftType, __pyx_k_EPSPowerShiftType, sizeof(__pyx_k_EPSPowerShiftType), 0, 0, 1, 1},
  {&__pyx_n_s_EPSProblemType, __pyx_k_EPSProblemType, sizeof(__pyx_k_EPSProblemType), 0, 0, 1, 1},
  {&__pyx_n_s_EPSType, __pyx_k_EPSType, sizeof(__pyx_k_EPSType), 0, 0, 1, 1},
  {&__pyx_n_s_EPSWhich, __pyx_k_EPSWhich, sizeof(__pyx_k_EPSWhich), 0, 0, 1, 1},
  {&__pyx_kp_s_EPS_Lanczos_reorthogonalization, __pyx_k_EPS_Lanczos_reorthogonalization, sizeof(__pyx_k_EPS_Lanczos_reorthogonalization), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_Power_shift_type_CONSTANT_R, __pyx_k_EPS_Power_shift_type_CONSTANT_R, sizeof(__pyx_k_EPS_Power_shift_type_CONSTANT_R), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_convergence_reasons_CONVERG, __pyx_k_EPS_convergence_reasons_CONVERG, sizeof(__pyx_k_EPS_convergence_reasons_CONVERG), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_convergence_test_ABS_REL_NO, __pyx_k_EPS_convergence_test_ABS_REL_NO, sizeof(__pyx_k_EPS_convergence_test_ABS_REL_NO), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_desired_piece_of_spectrum_L, __pyx_k_EPS_desired_piece_of_spectrum_L, sizeof(__pyx_k_EPS_desired_piece_of_spectrum_L), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_error_type_to_assess_accura, __pyx_k_EPS_error_type_to_assess_accura, sizeof(__pyx_k_EPS_error_type_to_assess_accura), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_extraction_technique_RITZ_S, __pyx_k_EPS_extraction_technique_RITZ_S, sizeof(__pyx_k_EPS_extraction_technique_RITZ_S), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_problem_type_HEP_Hermitian, __pyx_k_EPS_problem_type_HEP_Hermitian, sizeof(__pyx_k_EPS_problem_type_HEP_Hermitian), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_type_Native_sparse_eigensol, __pyx_k_EPS_type_Native_sparse_eigensol, sizeof(__pyx_k_EPS_type_Native_sparse_eigensol), 0, 0, 1, 0},
  {&__pyx_kp_s_EPS_type_of_balancing_used_for, __pyx_k_EPS_type_of_balancing_used_for, sizeof(__pyx_k_EPS_type_of_balancing_used_for), 0, 0, 1, 0},
  {&__pyx_n_s_EXP, __pyx_k_EXP, sizeof(__pyx_k_EXP), 0, 0, 1, 1},
  {&__pyx_n_s_EXPLICIT, __pyx_k_EXPLICIT, sizeof(__pyx_k_EXPLICIT), 0, 0, 1, 1},
  {&__pyx_n_s_EXPOKIT, __pyx_k_EXPOKIT, sizeof(__pyx_k_EXPOKIT), 0, 0, 1, 1},
  {&__pyx_n_s_Error, __pyx_k_Error, sizeof(__pyx_k_Error), 0, 0, 1, 1},
  {&__pyx_n_s_ErrorType, __pyx_k_ErrorType, sizeof(__pyx_k_ErrorType), 0, 0, 1, 1},
  {&__pyx_n_s_Extract, __pyx_k_Extract, sizeof(__pyx_k_Extract), 0, 0, 1, 1},
  {&__pyx_n_s_Extraction, __pyx_k_Extraction, sizeof(__pyx_k_Extraction), 0, 0, 1, 1},
  {&__pyx_kp_s_Extraction_strategy_used_to_obt, __pyx_k_Extraction_strategy_used_to_obt, sizeof(__pyx_k_Extraction_strategy_used_to_obt), 0, 0, 1, 0},
  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
  {&__pyx_n_s_FEAST, __pyx_k_FEAST, sizeof(__pyx_k_FEAST), 0, 0, 1, 1},
  {&__pyx_n_s_FNCombineType, __pyx_k_FNCombineType, sizeof(__pyx_k_FNCombineType), 0, 0, 1, 1},
  {&__pyx_n_s_FNType, __pyx_k_FNType, sizeof(__pyx_k_FNType), 0, 0, 1, 1},
  {&__pyx_kp_s_FN_type, __pyx_k_FN_type, sizeof(__pyx_k_FN_type), 0, 0, 1, 0},
  {&__pyx_kp_s_FN_type_of_combination_of_child, __pyx_k_FN_type_of_combination_of_child, sizeof(__pyx_k_FN_type_of_combination_of_child), 0, 0, 1, 0},
  {&__pyx_n_s_FULL, __pyx_k_FULL, sizeof(__pyx_k_FULL), 0, 0, 1, 1},
  {&__pyx_n_s_GD, __pyx_k_GD, sizeof(__pyx_k_GD), 0, 0, 1, 1},
  {&__pyx_n_s_GENERAL, __pyx_k_GENERAL, sizeof(__pyx_k_GENERAL), 0, 0, 1, 1},
  {&__pyx_n_s_GHEP, __pyx_k_GHEP, sizeof(__pyx_k_GHEP), 0, 0, 1, 1},
  {&__pyx_n_s_GHIEP, __pyx_k_GHIEP, sizeof(__pyx_k_GHIEP), 0, 0, 1, 1},
  {&__pyx_n_s_GNHEP, __pyx_k_GNHEP, sizeof(__pyx_k_GNHEP), 0, 0, 1, 1},
  {&__pyx_n_s_GS, __pyx_k_GS, sizeof(__pyx_k_GS), 0, 0, 1, 1},
  {&__pyx_n_s_GYROSCOPIC, __pyx_k_GYROSCOPIC, sizeof(__pyx_k_GYROSCOPIC), 0, 0, 1, 1},
  {&__pyx_n_s_HARMONIC, __pyx_k_HARMONIC, sizeof(__pyx_k_HARMONIC), 0, 0, 1, 1},
  {&__pyx_n_s_HARMONIC_LARGEST, __pyx_k_HARMONIC_LARGEST, sizeof(__pyx_k_HARMONIC_LARGEST), 0, 0, 1, 1},
  {&__pyx_n_s_HARMONIC_RELATIVE, __pyx_k_HARMONIC_RELATIVE, sizeof(__pyx_k_HARMONIC_RELATIVE), 0, 0, 1, 1},
  {&__pyx_n_s_HARMONIC_RIGHT, __pyx_k_HARMONIC_RIGHT, sizeof(__pyx_k_HARMONIC_RIGHT), 0, 0, 1, 1},
  {&__pyx_n_s_HEP, __pyx_k_HEP, sizeof(__pyx_k_HEP), 0, 0, 1, 1},
  {&__pyx_n_s_HERMITE, __pyx_k_HERMITE, sizeof(__pyx_k_HERMITE), 0, 0, 1, 1},
  {&__pyx_n_s_HERMITIAN, __pyx_k_HERMITIAN, sizeof(__pyx_k_HERMITIAN), 0, 0, 1, 1},
  {&__pyx_n_s_IFNEEDED, __pyx_k_IFNEEDED, sizeof(__pyx_k_IFNEEDED), 0, 0, 1, 1},
  {&__pyx_n_s_INPLACE, __pyx_k_INPLACE, sizeof(__pyx_k_INPLACE), 0, 0, 1, 1},
  {&__pyx_n_s_INTERMEDIATE, __pyx_k_INTERMEDIATE, sizeof(__pyx_k_INTERMEDIATE), 0, 0, 1, 1},
  {&__pyx_n_s_INTERPOL, __pyx_k_INTERPOL, sizeof(__pyx_k_INTERPOL), 0, 0, 1, 1},
  {&__pyx_n_s_INTERVAL, __pyx_k_INTERVAL, sizeof(__pyx_k_INTERVAL), 0, 0, 1, 1},
  {&__pyx_n_s_INVSQRT, __pyx_k_INVSQRT, sizeof(__pyx_k_INVSQRT), 0, 0, 1, 1},
  {&__pyx_n_s_ITERATING, __pyx_k_ITERATING, sizeof(__pyx_k_ITERATING), 0, 0, 1, 1},
  {&__pyx_n_s_J, __pyx_k_J, sizeof(__pyx_k_J), 0, 0, 1, 1},
  {&__pyx_n_s_JD, __pyx_k_JD, sizeof(__pyx_k_JD), 0, 0, 1, 1},
  {&__pyx_n_s_KRYLOV, __pyx_k_KRYLOV, sizeof(__pyx_k_KRYLOV), 0, 0, 1, 1},
  {&__pyx_n_s_KRYLOVSCHUR, __pyx_k_KRYLOVSCHUR, sizeof(__pyx_k_KRYLOVSCHUR), 0, 0, 1, 1},
  {&__pyx_n_s_LAGUERRE, __pyx_k_LAGUERRE, sizeof(__pyx_k_LAGUERRE), 0, 0, 1, 1},
  {&__pyx_n_s_LANCZOS, __pyx_k_LANCZOS, sizeof(__pyx_k_LANCZOS), 0, 0, 1, 1},
  {&__pyx_n_s_LAPACK, __pyx_k_LAPACK, sizeof(__pyx_k_LAPACK), 0, 0, 1, 1},
  {&__pyx_n_s_LARGEST, __pyx_k_LARGEST, sizeof(__pyx_k_LARGEST), 0, 0, 1, 1},
  {&__pyx_n_s_LARGEST_IMAGINARY, __pyx_k_LARGEST_IMAGINARY, sizeof(__pyx_k_LARGEST_IMAGINARY), 0, 0, 1, 1},
  {&__pyx_n_s_LARGEST_MAGNITUDE, __pyx_k_LARGEST_MAGNITUDE, sizeof(__pyx_k_LARGEST_MAGNITUDE), 0, 0, 1, 1},
  {&__pyx_n_s_LARGEST_REAL, __pyx_k_LARGEST_REAL, sizeof(__pyx_k_LARGEST_REAL), 0, 0, 1, 1},
  {&__pyx_n_s_LEGENDRE, __pyx_k_LEGENDRE, sizeof(__pyx_k_LEGENDRE), 0, 0, 1, 1},
  {&__pyx_n_s_LINEAR, __pyx_k_LINEAR, sizeof(__pyx_k_LINEAR), 0, 0, 1, 1},
  {&__pyx_n_s_LOBPCG, __pyx_k_LOBPCG, sizeof(__pyx_k_LOBPCG), 0, 0, 1, 1},
  {&__pyx_n_s_LOCAL, __pyx_k_LOCAL, sizeof(__pyx_k_LOCAL), 0, 0, 1, 1},
  {&__pyx_n_s_LOG, __pyx_k_LOG, sizeof(__pyx_k_LOG), 0, 0, 1, 1},
  {&__pyx_n_s_LanczosReorthogType, __pyx_k_LanczosReorthogType, sizeof(__pyx_k_LanczosReorthogType), 0, 0, 1, 1},
  {&__pyx_n_s_MAT, __pyx_k_MAT, sizeof(__pyx_k_MAT), 0, 0, 1, 1},
  {&__pyx_n_s_MBE, __pyx_k_MBE, sizeof(__pyx_k_MBE), 0, 0, 1, 1},
  {&__pyx_n_s_MFNConvergedReason, __pyx_k_MFNConvergedReason, sizeof(__pyx_k_MFNConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_MFNType, __pyx_k_MFNType, sizeof(__pyx_k_MFNType), 0, 0, 1, 1},
  {&__pyx_kp_s_MFN_type_Action_of_a_matrix_fun, __pyx_k_MFN_type_Action_of_a_matrix_fun, sizeof(__pyx_k_MFN_type_Action_of_a_matrix_fun), 0, 0, 1, 0},
  {&__pyx_n_s_MGS, __pyx_k_MGS, sizeof(__pyx_k_MGS), 0, 0, 1, 1},
  {&__pyx_n_s_MONOMIAL, __pyx_k_MONOMIAL, sizeof(__pyx_k_MONOMIAL), 0, 0, 1, 1},
  {&__pyx_n_s_MULTIPLE, __pyx_k_MULTIPLE, sizeof(__pyx_k_MULTIPLE), 0, 0, 1, 1},
  {&__pyx_n_s_MULTIPLY, __pyx_k_MULTIPLY, sizeof(__pyx_k_MULTIPLY), 0, 0, 1, 1},
  {&__pyx_n_s_MatMode, __pyx_k_MatMode, sizeof(__pyx_k_MatMode), 0, 0, 1, 1},
  {&__pyx_n_s_MatType, __pyx_k_MatType, sizeof(__pyx_k_MatType), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_NARNOLDI, __pyx_k_NARNOLDI, sizeof(__pyx_k_NARNOLDI), 0, 0, 1, 1},
  {&__pyx_n_s_NEP, __pyx_k_NEP, sizeof(__pyx_k_NEP), 0, 0, 1, 1},
  {&__pyx_n_s_NEPConvergedReason, __pyx_k_NEPConvergedReason, sizeof(__pyx_k_NEPConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_NEPErrorType, __pyx_k_NEPErrorType, sizeof(__pyx_k_NEPErrorType), 0, 0, 1, 1},
  {&__pyx_n_s_NEPRefine, __pyx_k_NEPRefine, sizeof(__pyx_k_NEPRefine), 0, 0, 1, 1},
  {&__pyx_n_s_NEPRefineScheme, __pyx_k_NEPRefineScheme, sizeof(__pyx_k_NEPRefineScheme), 0, 0, 1, 1},
  {&__pyx_n_s_NEPType, __pyx_k_NEPType, sizeof(__pyx_k_NEPType), 0, 0, 1, 1},
  {&__pyx_n_s_NEPWhich, __pyx_k_NEPWhich, sizeof(__pyx_k_NEPWhich), 0, 0, 1, 1},
  {&__pyx_kp_s_NEP_error_type_to_assess_accura, __pyx_k_NEP_error_type_to_assess_accura, sizeof(__pyx_k_NEP_error_type_to_assess_accura), 0, 0, 1, 0},
  {&__pyx_kp_s_NEP_refinement_strategy_NONE_No, __pyx_k_NEP_refinement_strategy_NONE_No, sizeof(__pyx_k_NEP_refinement_strategy_NONE_No), 0, 0, 1, 0},
  {&__pyx_kp_s_NEP_type_Nonlinear_eigensolvers, __pyx_k_NEP_type_Nonlinear_eigensolvers, sizeof(__pyx_k_NEP_type_Nonlinear_eigensolvers), 0, 0, 1, 0},
  {&__pyx_n_s_NEVER, __pyx_k_NEVER, sizeof(__pyx_k_NEVER), 0, 0, 1, 1},
  {&__pyx_n_s_NHEP, __pyx_k_NHEP, sizeof(__pyx_k_NHEP), 0, 0, 1, 1},
  {&__pyx_n_s_NLEIGS, __pyx_k_NLEIGS, sizeof(__pyx_k_NLEIGS), 0, 0, 1, 1},
  {&__pyx_n_s_NONE, __pyx_k_NONE, sizeof(__pyx_k_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_NORM, __pyx_k_NORM, sizeof(__pyx_k_NORM), 0, 0, 1, 1},
  {&__pyx_n_s_ONESIDE, __pyx_k_ONESIDE, sizeof(__pyx_k_ONESIDE), 0, 0, 1, 1},
  {&__pyx_n_s_OrthogBlockType, __pyx_k_OrthogBlockType, sizeof(__pyx_k_OrthogBlockType), 0, 0, 1, 1},
  {&__pyx_n_s_OrthogRefineType, __pyx_k_OrthogRefineType, sizeof(__pyx_k_OrthogRefineType), 0, 0, 1, 1},
  {&__pyx_n_s_OrthogType, __pyx_k_OrthogType, sizeof(__pyx_k_OrthogType), 0, 0, 1, 1},
  {&__pyx_n_s_P, __pyx_k_P, sizeof(__pyx_k_P), 0, 0, 1, 1},
  {&__pyx_n_s_PARTIAL, __pyx_k_PARTIAL, sizeof(__pyx_k_PARTIAL), 0, 0, 1, 1},
  {&__pyx_n_s_PEP, __pyx_k_PEP, sizeof(__pyx_k_PEP), 0, 0, 1, 1},
  {&__pyx_n_s_PEPBasis, __pyx_k_PEPBasis, sizeof(__pyx_k_PEPBasis), 0, 0, 1, 1},
  {&__pyx_n_s_PEPConv, __pyx_k_PEPConv, sizeof(__pyx_k_PEPConv), 0, 0, 1, 1},
  {&__pyx_n_s_PEPConvergedReason, __pyx_k_PEPConvergedReason, sizeof(__pyx_k_PEPConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_PEPErrorType, __pyx_k_PEPErrorType, sizeof(__pyx_k_PEPErrorType), 0, 0, 1, 1},
  {&__pyx_n_s_PEPExtract, __pyx_k_PEPExtract, sizeof(__pyx_k_PEPExtract), 0, 0, 1, 1},
  {&__pyx_n_s_PEPProblemType, __pyx_k_PEPProblemType, sizeof(__pyx_k_PEPProblemType), 0, 0, 1, 1},
  {&__pyx_n_s_PEPRefine, __pyx_k_PEPRefine, sizeof(__pyx_k_PEPRefine), 0, 0, 1, 1},
  {&__pyx_n_s_PEPRefineScheme, __pyx_k_PEPRefineScheme, sizeof(__pyx_k_PEPRefineScheme), 0, 0, 1, 1},
  {&__pyx_n_s_PEPScale, __pyx_k_PEPScale, sizeof(__pyx_k_PEPScale), 0, 0, 1, 1},
  {&__pyx_n_s_PEPType, __pyx_k_PEPType, sizeof(__pyx_k_PEPType), 0, 0, 1, 1},
  {&__pyx_n_s_PEPWhich, __pyx_k_PEPWhich, sizeof(__pyx_k_PEPWhich), 0, 0, 1, 1},
  {&__pyx_kp_s_PEP_convergence_reasons_CONVERG, __pyx_k_PEP_convergence_reasons_CONVERG, sizeof(__pyx_k_PEP_convergence_reasons_CONVERG), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_convergence_test_ABS_REL_NO, __pyx_k_PEP_convergence_test_ABS_REL_NO, sizeof(__pyx_k_PEP_convergence_test_ABS_REL_NO), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_desired_part_of_spectrum_LA, __pyx_k_PEP_desired_part_of_spectrum_LA, sizeof(__pyx_k_PEP_desired_part_of_spectrum_LA), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_error_type_to_assess_accura, __pyx_k_PEP_error_type_to_assess_accura, sizeof(__pyx_k_PEP_error_type_to_assess_accura), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_problem_type_GENERAL_No_str, __pyx_k_PEP_problem_type_GENERAL_No_str, sizeof(__pyx_k_PEP_problem_type_GENERAL_No_str), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_refinement_strategy_NONE_No, __pyx_k_PEP_refinement_strategy_NONE_No, sizeof(__pyx_k_PEP_refinement_strategy_NONE_No), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_scaling_strategy_NONE_No_sc, __pyx_k_PEP_scaling_strategy_NONE_No_sc, sizeof(__pyx_k_PEP_scaling_strategy_NONE_No_sc), 0, 0, 1, 0},
  {&__pyx_kp_s_PEP_type_Polynomial_eigensolver, __pyx_k_PEP_type_Polynomial_eigensolver, sizeof(__pyx_k_PEP_type_Polynomial_eigensolver), 0, 0, 1, 0},
  {&__pyx_n_s_PERIODIC, __pyx_k_PERIODIC, sizeof(__pyx_k_PERIODIC), 0, 0, 1, 1},
  {&__pyx_n_s_PGNHEP, __pyx_k_PGNHEP, sizeof(__pyx_k_PGNHEP), 0, 0, 1, 1},
  {&__pyx_n_s_PHI, __pyx_k_PHI, sizeof(__pyx_k_PHI), 0, 0, 1, 1},
  {&__pyx_n_s_POLYGON, __pyx_k_POLYGON, sizeof(__pyx_k_POLYGON), 0, 0, 1, 1},
  {&__pyx_n_s_POWER, __pyx_k_POWER, sizeof(__pyx_k_POWER), 0, 0, 1, 1},
  {&__pyx_n_s_PRECOND, __pyx_k_PRECOND, sizeof(__pyx_k_PRECOND), 0, 0, 1, 1},
  {&__pyx_n_s_PRIMME, __pyx_k_PRIMME, sizeof(__pyx_k_PRIMME), 0, 0, 1, 1},
  {&__pyx_n_s_PowerShiftType, __pyx_k_PowerShiftType, sizeof(__pyx_k_PowerShiftType), 0, 0, 1, 1},
  {&__pyx_n_s_ProblemType, __pyx_k_ProblemType, sizeof(__pyx_k_ProblemType), 0, 0, 1, 1},
  {&__pyx_n_s_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 1, 1},
  {&__pyx_n_s_QARNOLDI, __pyx_k_QARNOLDI, sizeof(__pyx_k_QARNOLDI), 0, 0, 1, 1},
  {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
  {&__pyx_n_s_RATIONAL, __pyx_k_RATIONAL, sizeof(__pyx_k_RATIONAL), 0, 0, 1, 1},
  {&__pyx_n_s_RAW, __pyx_k_RAW, sizeof(__pyx_k_RAW), 0, 0, 1, 1},
  {&__pyx_n_s_RAYLEIGH, __pyx_k_RAYLEIGH, sizeof(__pyx_k_RAYLEIGH), 0, 0, 1, 1},
  {&__pyx_n_s_REFINED, __pyx_k_REFINED, sizeof(__pyx_k_REFINED), 0, 0, 1, 1},
  {&__pyx_n_s_REFINED_HARMONIC, __pyx_k_REFINED_HARMONIC, sizeof(__pyx_k_REFINED_HARMONIC), 0, 0, 1, 1},
  {&__pyx_n_s_REL, __pyx_k_REL, sizeof(__pyx_k_REL), 0, 0, 1, 1},
  {&__pyx_n_s_RELATIVE, __pyx_k_RELATIVE, sizeof(__pyx_k_RELATIVE), 0, 0, 1, 1},
  {&__pyx_n_s_RESIDUAL, __pyx_k_RESIDUAL, sizeof(__pyx_k_RESIDUAL), 0, 0, 1, 1},
  {&__pyx_n_s_RGType, __pyx_k_RGType, sizeof(__pyx_k_RGType), 0, 0, 1, 1},
  {&__pyx_kp_s_RG_type, __pyx_k_RG_type, sizeof(__pyx_k_RG_type), 0, 0, 1, 0},
  {&__pyx_n_s_RII, __pyx_k_RII, sizeof(__pyx_k_RII), 0, 0, 1, 1},
  {&__pyx_n_s_RING, __pyx_k_RING, sizeof(__pyx_k_RING), 0, 0, 1, 1},
  {&__pyx_n_s_RITZ, __pyx_k_RITZ, sizeof(__pyx_k_RITZ), 0, 0, 1, 1},
  {&__pyx_n_s_RQCG, __pyx_k_RQCG, sizeof(__pyx_k_RQCG), 0, 0, 1, 1},
  {&__pyx_n_s_Refine, __pyx_k_Refine, sizeof(__pyx_k_Refine), 0, 0, 1, 1},
  {&__pyx_n_s_RefineScheme, __pyx_k_RefineScheme, sizeof(__pyx_k_RefineScheme), 0, 0, 1, 1},
  {&__pyx_n_s_RefineType, __pyx_k_RefineType, sizeof(__pyx_k_RefineType), 0, 0, 1, 1},
  {&__pyx_n_s_SCALAR, __pyx_k_SCALAR, sizeof(__pyx_k_SCALAR), 0, 0, 1, 1},
  {&__pyx_n_s_SCHUR, __pyx_k_SCHUR, sizeof(__pyx_k_SCHUR), 0, 0, 1, 1},
  {&__pyx_n_s_SELECTIVE, __pyx_k_SELECTIVE, sizeof(__pyx_k_SELECTIVE), 0, 0, 1, 1},
  {&__pyx_n_s_SHELL, __pyx_k_SHELL, sizeof(__pyx_k_SHELL), 0, 0, 1, 1},
  {&__pyx_n_s_SHIFT, __pyx_k_SHIFT, sizeof(__pyx_k_SHIFT), 0, 0, 1, 1},
  {&__pyx_n_s_SIMPLE, __pyx_k_SIMPLE, sizeof(__pyx_k_SIMPLE), 0, 0, 1, 1},
  {&__pyx_n_s_SINVERT, __pyx_k_SINVERT, sizeof(__pyx_k_SINVERT), 0, 0, 1, 1},
  {&__pyx_n_s_SLP, __pyx_k_SLP, sizeof(__pyx_k_SLP), 0, 0, 1, 1},
  {&__pyx_n_s_SMALLEST, __pyx_k_SMALLEST, sizeof(__pyx_k_SMALLEST), 0, 0, 1, 1},
  {&__pyx_n_s_SMALLEST_IMAGINARY, __pyx_k_SMALLEST_IMAGINARY, sizeof(__pyx_k_SMALLEST_IMAGINARY), 0, 0, 1, 1},
  {&__pyx_n_s_SMALLEST_MAGNITUDE, __pyx_k_SMALLEST_MAGNITUDE, sizeof(__pyx_k_SMALLEST_MAGNITUDE), 0, 0, 1, 1},
  {&__pyx_n_s_SMALLEST_REAL, __pyx_k_SMALLEST_REAL, sizeof(__pyx_k_SMALLEST_REAL), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT, __pyx_k_SQRT, sizeof(__pyx_k_SQRT), 0, 0, 1, 1},
  {&__pyx_n_s_STMatMode, __pyx_k_STMatMode, sizeof(__pyx_k_STMatMode), 0, 0, 1, 1},
  {&__pyx_n_s_STOAR, __pyx_k_STOAR, sizeof(__pyx_k_STOAR), 0, 0, 1, 1},
  {&__pyx_n_s_STRUCTURED, __pyx_k_STRUCTURED, sizeof(__pyx_k_STRUCTURED), 0, 0, 1, 1},
  {&__pyx_n_s_STType, __pyx_k_STType, sizeof(__pyx_k_STType), 0, 0, 1, 1},
  {&__pyx_kp_s_ST_matrix_mode_COPY_A_working_c, __pyx_k_ST_matrix_mode_COPY_A_working_c, sizeof(__pyx_k_ST_matrix_mode_COPY_A_working_c), 0, 0, 1, 0},
  {&__pyx_kp_s_ST_types_SHELL_User_defined_SHI, __pyx_k_ST_types_SHELL_User_defined_SHI, sizeof(__pyx_k_ST_types_SHELL_User_defined_SHI), 0, 0, 1, 0},
  {&__pyx_n_s_SUBSPACE, __pyx_k_SUBSPACE, sizeof(__pyx_k_SUBSPACE), 0, 0, 1, 1},
  {&__pyx_n_s_SVD, __pyx_k_SVD, sizeof(__pyx_k_SVD), 0, 0, 1, 1},
  {&__pyx_n_s_SVDConvergedReason, __pyx_k_SVDConvergedReason, sizeof(__pyx_k_SVDConvergedReason), 0, 0, 1, 1},
  {&__pyx_n_s_SVDErrorType, __pyx_k_SVDErrorType, sizeof(__pyx_k_SVDErrorType), 0, 0, 1, 1},
  {&__pyx_n_s_SVDType, __pyx_k_SVDType, sizeof(__pyx_k_SVDType), 0, 0, 1, 1},
  {&__pyx_n_s_SVDWhich, __pyx_k_SVDWhich, sizeof(__pyx_k_SVDWhich), 0, 0, 1, 1},
  {&__pyx_kp_s_SVD_convergence_reasons_CONVERG, __pyx_k_SVD_convergence_reasons_CONVERG, sizeof(__pyx_k_SVD_convergence_reasons_CONVERG), 0, 0, 1, 0},
  {&__pyx_kp_s_SVD_desired_piece_of_spectrum_L, __pyx_k_SVD_desired_piece_of_spectrum_L, sizeof(__pyx_k_SVD_desired_piece_of_spectrum_L), 0, 0, 1, 0},
  {&__pyx_kp_s_SVD_error_type_to_assess_accura, __pyx_k_SVD_error_type_to_assess_accura, sizeof(__pyx_k_SVD_error_type_to_assess_accura), 0, 0, 1, 0},
  {&__pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi, __pyx_k_SVD_types_CROSS_Eigenproblem_wi, sizeof(__pyx_k_SVD_types_CROSS_Eigenproblem_wi), 0, 0, 1, 0},
  {&__pyx_n_s_SVEC, __pyx_k_SVEC, sizeof(__pyx_k_SVEC), 0, 0, 1, 1},
  {&__pyx_kp_s_Scalable_Library_for_Eigenvalue, __pyx_k_Scalable_Library_for_Eigenvalue, sizeof(__pyx_k_Scalable_Library_for_Eigenvalue), 0, 0, 1, 0},
  {&__pyx_n_s_Scale, __pyx_k_Scale, sizeof(__pyx_k_Scale), 0, 0, 1, 1},
  {&__pyx_kp_s_Scheme_for_solving_linear_syste, __pyx_k_Scheme_for_solving_linear_syste, sizeof(__pyx_k_Scheme_for_solving_linear_syste), 0, 0, 1, 0},
  {&__pyx_n_s_StateType, __pyx_k_StateType, sizeof(__pyx_k_StateType), 0, 0, 1, 1},
  {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
  {&__pyx_n_s_TARGET_IMAGINARY, __pyx_k_TARGET_IMAGINARY, sizeof(__pyx_k_TARGET_IMAGINARY), 0, 0, 1, 1},
  {&__pyx_n_s_TARGET_MAGNITUDE, __pyx_k_TARGET_MAGNITUDE, sizeof(__pyx_k_TARGET_MAGNITUDE), 0, 0, 1, 1},
  {&__pyx_n_s_TARGET_REAL, __pyx_k_TARGET_REAL, sizeof(__pyx_k_TARGET_REAL), 0, 0, 1, 1},
  {&__pyx_n_s_TOAR, __pyx_k_TOAR, sizeof(__pyx_k_TOAR), 0, 0, 1, 1},
  {&__pyx_n_s_TRLAN, __pyx_k_TRLAN, sizeof(__pyx_k_TRLAN), 0, 0, 1, 1},
  {&__pyx_n_s_TRLANCZOS, __pyx_k_TRLANCZOS, sizeof(__pyx_k_TRLANCZOS), 0, 0, 1, 1},
  {&__pyx_n_s_TRUNCATED, __pyx_k_TRUNCATED, sizeof(__pyx_k_TRUNCATED), 0, 0, 1, 1},
  {&__pyx_n_s_TWOSIDE, __pyx_k_TWOSIDE, sizeof(__pyx_k_TWOSIDE), 0, 0, 1, 1},
  {&__pyx_kp_s_To_refer_to_one_of_the_matrices, __pyx_k_To_refer_to_one_of_the_matrices, sizeof(__pyx_k_To_refer_to_one_of_the_matrices), 0, 0, 1, 0},
  {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1},
  {&__pyx_n_s_USER, __pyx_k_USER, sizeof(__pyx_k_USER), 0, 0, 1, 1},
  {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1},
  {&__pyx_n_s_VECS, __pyx_k_VECS, sizeof(__pyx_k_VECS), 0, 0, 1, 1},
  {&__pyx_n_s_VT, __pyx_k_VT, sizeof(__pyx_k_VT), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Vi, __pyx_k_Vi, sizeof(__pyx_k_Vi), 0, 0, 1, 1},
  {&__pyx_n_s_Vr, __pyx_k_Vr, sizeof(__pyx_k_Vr), 0, 0, 1, 1},
  {&__pyx_n_s_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1},
  {&__pyx_n_s_WILKINSON, __pyx_k_WILKINSON, sizeof(__pyx_k_WILKINSON), 0, 0, 1, 1},
  {&__pyx_n_s_Which, __pyx_k_Which, sizeof(__pyx_k_Which), 0, 0, 1, 1},
  {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1},
  {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1},
  {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1},
  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1},
  {&__pyx_n_s_authorinfo, __pyx_k_authorinfo, sizeof(__pyx_k_authorinfo), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_balance, __pyx_k_balance, sizeof(__pyx_k_balance), 0, 0, 1, 1},
  {&__pyx_n_s_basis, __pyx_k_basis, sizeof(__pyx_k_basis), 0, 0, 1, 1},
  {&__pyx_n_s_beta, __pyx_k_beta, sizeof(__pyx_k_beta), 0, 0, 1, 1},
  {&__pyx_n_s_block, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1},
  {&__pyx_n_s_bv, __pyx_k_bv, sizeof(__pyx_k_bv), 0, 0, 1, 1},
  {&__pyx_n_s_bv_type, __pyx_k_bv_type, sizeof(__pyx_k_bv_type), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {&__pyx_n_s_cform, __pyx_k_cform, sizeof(__pyx_k_cform), 0, 0, 1, 1},
  {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1},
  {&__pyx_n_s_comp, __pyx_k_comp, sizeof(__pyx_k_comp), 0, 0, 1, 1},
  {&__pyx_n_s_conv, __pyx_k_conv, sizeof(__pyx_k_conv), 0, 0, 1, 1},
  {&__pyx_n_s_create, __pyx_k_create, sizeof(__pyx_k_create), 0, 0, 1, 1},
  {&__pyx_n_s_createDense, __pyx_k_createDense, sizeof(__pyx_k_createDense), 0, 0, 1, 1},
  {&__pyx_n_s_cutoff, __pyx_k_cutoff, sizeof(__pyx_k_cutoff), 0, 0, 1, 1},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_delayed, __pyx_k_delayed, sizeof(__pyx_k_delayed), 0, 0, 1, 1},
  {&__pyx_n_s_detect, __pyx_k_detect, sizeof(__pyx_k_detect), 0, 0, 1, 1},
  {&__pyx_n_s_devel, __pyx_k_devel, sizeof(__pyx_k_devel), 0, 0, 1, 1},
  {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
  {&__pyx_n_s_ds, __pyx_k_ds, sizeof(__pyx_k_ds), 0, 0, 1, 1},
  {&__pyx_n_s_ds_type, __pyx_k_ds_type, sizeof(__pyx_k_ds_type), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 0, 0, 1, 1},
  {&__pyx_n_s_eps_type, __pyx_k_eps_type, sizeof(__pyx_k_eps_type), 0, 0, 1, 1},
  {&__pyx_n_s_eta, __pyx_k_eta, sizeof(__pyx_k_eta), 0, 0, 1, 1},
  {&__pyx_n_s_etype, __pyx_k_etype, sizeof(__pyx_k_etype), 0, 0, 1, 1},
  {&__pyx_n_s_ext, __pyx_k_ext, sizeof(__pyx_k_ext), 0, 0, 1, 1},
  {&__pyx_n_s_extraction, __pyx_k_extraction, sizeof(__pyx_k_extraction), 0, 0, 1, 1},
  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
  {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1},
  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
  {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
  {&__pyx_n_s_fn_type, __pyx_k_fn_type, sizeof(__pyx_k_fn_type), 0, 0, 1, 1},
  {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
  {&__pyx_n_s_getActiveColumns, __pyx_k_getActiveColumns, sizeof(__pyx_k_getActiveColumns), 0, 0, 1, 1},
  {&__pyx_n_s_getBV, __pyx_k_getBV, sizeof(__pyx_k_getBV), 0, 0, 1, 1},
  {&__pyx_n_s_getExtraction, __pyx_k_getExtraction, sizeof(__pyx_k_getExtraction), 0, 0, 1, 1},
  {&__pyx_n_s_getKSP, __pyx_k_getKSP, sizeof(__pyx_k_getKSP), 0, 0, 1, 1},
  {&__pyx_n_s_getMatMode, __pyx_k_getMatMode, sizeof(__pyx_k_getMatMode), 0, 0, 1, 1},
  {&__pyx_n_s_getProblemType, __pyx_k_getProblemType, sizeof(__pyx_k_getProblemType), 0, 0, 1, 1},
  {&__pyx_n_s_getST, __pyx_k_getST, sizeof(__pyx_k_getST), 0, 0, 1, 1},
  {&__pyx_n_s_getShift, __pyx_k_getShift, sizeof(__pyx_k_getShift), 0, 0, 1, 1},
  {&__pyx_n_s_getTarget, __pyx_k_getTarget, sizeof(__pyx_k_getTarget), 0, 0, 1, 1},
  {&__pyx_n_s_getTolerances, __pyx_k_getTolerances, sizeof(__pyx_k_getTolerances), 0, 0, 1, 1},
  {&__pyx_n_s_getTransposeMode, __pyx_k_getTransposeMode, sizeof(__pyx_k_getTransposeMode), 0, 0, 1, 1},
  {&__pyx_n_s_getVersion, __pyx_k_getVersion, sizeof(__pyx_k_getVersion), 0, 0, 1, 1},
  {&__pyx_n_s_getVersionInfo, __pyx_k_getVersionInfo, sizeof(__pyx_k_getVersionInfo), 0, 0, 1, 1},
  {&__pyx_n_s_getWhichEigenpairs, __pyx_k_getWhichEigenpairs, sizeof(__pyx_k_getWhichEigenpairs), 0, 0, 1, 1},
  {&__pyx_n_s_getWhichSingularTriplets, __pyx_k_getWhichSingularTriplets, sizeof(__pyx_k_getWhichSingularTriplets), 0, 0, 1, 1},
  {&__pyx_n_s_ghostUpdate, __pyx_k_ghostUpdate, sizeof(__pyx_k_ghostUpdate), 0, 0, 1, 1},
  {&__pyx_n_s_globalup, __pyx_k_globalup, sizeof(__pyx_k_globalup), 0, 0, 1, 1},
  {&__pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_k_home_dalcinl_Devel_slepc4py_dev, sizeof(__pyx_k_home_dalcinl_Devel_slepc4py_dev), 0, 0, 1, 0},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_indef, __pyx_k_indef, sizeof(__pyx_k_indef), 0, 0, 1, 1},
  {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1},
  {&__pyx_n_s_inta, __pyx_k_inta, sizeof(__pyx_k_inta), 0, 0, 1, 1},
  {&__pyx_n_s_intb, __pyx_k_intb, sizeof(__pyx_k_intb), 0, 0, 1, 1},
  {&__pyx_n_s_iterations, __pyx_k_iterations, sizeof(__pyx_k_iterations), 0, 0, 1, 1},
  {&__pyx_n_s_its, __pyx_k_its, sizeof(__pyx_k_its), 0, 0, 1, 1},
  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
  {&__pyx_n_s_jacobian, __pyx_k_jacobian, sizeof(__pyx_k_jacobian), 0, 0, 1, 1},
  {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
  {&__pyx_n_s_kargs, __pyx_k_kargs, sizeof(__pyx_k_kargs), 0, 0, 1, 1},
  {&__pyx_n_s_keep, __pyx_k_keep, sizeof(__pyx_k_keep), 0, 0, 1, 1},
  {&__pyx_n_s_ksp, __pyx_k_ksp, sizeof(__pyx_k_ksp), 0, 0, 1, 1},
  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
  {&__pyx_n_s_lag, __pyx_k_lag, sizeof(__pyx_k_lag), 0, 0, 1, 1},
  {&__pyx_n_s_lbda, __pyx_k_lbda, sizeof(__pyx_k_lbda), 0, 0, 1, 1},
  {&__pyx_n_s_ld, __pyx_k_ld, sizeof(__pyx_k_ld), 0, 0, 1, 1},
  {&__pyx_kp_s_local_and_global_sizes_cannot_be, __pyx_k_local_and_global_sizes_cannot_be, sizeof(__pyx_k_local_and_global_sizes_cannot_be), 0, 0, 1, 0},
  {&__pyx_n_s_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
  {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1},
  {&__pyx_n_s_max_it, __pyx_k_max_it, sizeof(__pyx_k_max_it), 0, 0, 1, 1},
  {&__pyx_n_s_maxit, __pyx_k_maxit, sizeof(__pyx_k_maxit), 0, 0, 1, 1},
  {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
  {&__pyx_n_s_meth, __pyx_k_meth, sizeof(__pyx_k_meth), 0, 0, 1, 1},
  {&__pyx_n_s_mfn_type, __pyx_k_mfn_type, sizeof(__pyx_k_mfn_type), 0, 0, 1, 1},
  {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
  {&__pyx_n_s_mpd, __pyx_k_mpd, sizeof(__pyx_k_mpd), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_ncv, __pyx_k_ncv, sizeof(__pyx_k_ncv), 0, 0, 1, 1},
  {&__pyx_n_s_nep_type, __pyx_k_nep_type, sizeof(__pyx_k_nep_type), 0, 0, 1, 1},
  {&__pyx_n_s_nev, __pyx_k_nev, sizeof(__pyx_k_nev), 0, 0, 1, 1},
  {&__pyx_n_s_norm_type, __pyx_k_norm_type, sizeof(__pyx_k_norm_type), 0, 0, 1, 1},
  {&__pyx_n_s_npart, __pyx_k_npart, sizeof(__pyx_k_npart), 0, 0, 1, 1},
  {&__pyx_n_s_nrest, __pyx_k_nrest, sizeof(__pyx_k_nrest), 0, 0, 1, 1},
  {&__pyx_n_s_nsv, __pyx_k_nsv, sizeof(__pyx_k_nsv), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_operators, __pyx_k_operators, sizeof(__pyx_k_operators), 0, 0, 1, 1},
  {&__pyx_n_s_orth, __pyx_k_orth, sizeof(__pyx_k_orth), 0, 0, 1, 1},
  {&__pyx_n_s_patch, __pyx_k_patch, sizeof(__pyx_k_patch), 0, 0, 1, 1},
  {&__pyx_n_s_pep_type, __pyx_k_pep_type, sizeof(__pyx_k_pep_type), 0, 0, 1, 1},
  {&__pyx_n_s_petsc4py_PETSc, __pyx_k_petsc4py_PETSc, sizeof(__pyx_k_petsc4py_PETSc), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
  {&__pyx_n_s_problem_type, __pyx_k_problem_type, sizeof(__pyx_k_problem_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 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_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_ready, __pyx_k_ready, sizeof(__pyx_k_ready), 0, 0, 1, 1},
  {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
  {&__pyx_n_s_refine, __pyx_k_refine, sizeof(__pyx_k_refine), 0, 0, 1, 1},
  {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1},
  {&__pyx_n_s_reorthog, __pyx_k_reorthog, sizeof(__pyx_k_reorthog), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_rg, __pyx_k_rg, sizeof(__pyx_k_rg), 0, 0, 1, 1},
  {&__pyx_n_s_rg_type, __pyx_k_rg_type, sizeof(__pyx_k_rg_type), 0, 0, 1, 1},
  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {&__pyx_n_s_scheme, __pyx_k_scheme, sizeof(__pyx_k_scheme), 0, 0, 1, 1},
  {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1},
  {&__pyx_n_s_setArray, __pyx_k_setArray, sizeof(__pyx_k_setArray), 0, 0, 1, 1},
  {&__pyx_n_s_setBV, __pyx_k_setBV, sizeof(__pyx_k_setBV), 0, 0, 1, 1},
  {&__pyx_n_s_setExtraction, __pyx_k_setExtraction, sizeof(__pyx_k_setExtraction), 0, 0, 1, 1},
  {&__pyx_n_s_setKSP, __pyx_k_setKSP, sizeof(__pyx_k_setKSP), 0, 0, 1, 1},
  {&__pyx_n_s_setMatMode, __pyx_k_setMatMode, sizeof(__pyx_k_setMatMode), 0, 0, 1, 1},
  {&__pyx_n_s_setOrthogonalization, __pyx_k_setOrthogonalization, sizeof(__pyx_k_setOrthogonalization), 0, 0, 1, 1},
  {&__pyx_n_s_setProblemType, __pyx_k_setProblemType, sizeof(__pyx_k_setProblemType), 0, 0, 1, 1},
  {&__pyx_n_s_setST, __pyx_k_setST, sizeof(__pyx_k_setST), 0, 0, 1, 1},
  {&__pyx_n_s_setShift, __pyx_k_setShift, sizeof(__pyx_k_setShift), 0, 0, 1, 1},
  {&__pyx_n_s_setSizes, __pyx_k_setSizes, sizeof(__pyx_k_setSizes), 0, 0, 1, 1},
  {&__pyx_n_s_setTarget, __pyx_k_setTarget, sizeof(__pyx_k_setTarget), 0, 0, 1, 1},
  {&__pyx_n_s_setTolerances, __pyx_k_setTolerances, sizeof(__pyx_k_setTolerances), 0, 0, 1, 1},
  {&__pyx_n_s_setTransposeMode, __pyx_k_setTransposeMode, sizeof(__pyx_k_setTransposeMode), 0, 0, 1, 1},
  {&__pyx_n_s_setType, __pyx_k_setType, sizeof(__pyx_k_setType), 0, 0, 1, 1},
  {&__pyx_n_s_setUp, __pyx_k_setUp, sizeof(__pyx_k_setUp), 0, 0, 1, 1},
  {&__pyx_n_s_setWhichEigenpairs, __pyx_k_setWhichEigenpairs, sizeof(__pyx_k_setWhichEigenpairs), 0, 0, 1, 1},
  {&__pyx_n_s_setWhichSingularTriplets, __pyx_k_setWhichSingularTriplets, sizeof(__pyx_k_setWhichSingularTriplets), 0, 0, 1, 1},
  {&__pyx_n_s_shift, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1},
  {&__pyx_n_s_sizes, __pyx_k_sizes, sizeof(__pyx_k_sizes), 0, 0, 1, 1},
  {&__pyx_n_s_slepc4py_SLEPc, __pyx_k_slepc4py_SLEPc, sizeof(__pyx_k_slepc4py_SLEPc), 0, 0, 1, 1},
  {&__pyx_n_s_space, __pyx_k_space, sizeof(__pyx_k_space), 0, 0, 1, 1},
  {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
  {&__pyx_n_s_st_type, __pyx_k_st_type, sizeof(__pyx_k_st_type), 0, 0, 1, 1},
  {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
  {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
  {&__pyx_n_s_structure, __pyx_k_structure, sizeof(__pyx_k_structure), 0, 0, 1, 1},
  {&__pyx_n_s_subint, __pyx_k_subint, sizeof(__pyx_k_subint), 0, 0, 1, 1},
  {&__pyx_n_s_subminor, __pyx_k_subminor, sizeof(__pyx_k_subminor), 0, 0, 1, 1},
  {&__pyx_n_s_svd_type, __pyx_k_svd_type, sizeof(__pyx_k_svd_type), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
  {&__pyx_n_s_tol, __pyx_k_tol, sizeof(__pyx_k_tol), 0, 0, 1, 1},
  {&__pyx_n_s_trackall, __pyx_k_trackall, sizeof(__pyx_k_trackall), 0, 0, 1, 1},
  {&__pyx_n_s_trueres, __pyx_k_trueres, sizeof(__pyx_k_trueres), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_viewer, __pyx_k_viewer, sizeof(__pyx_k_viewer), 0, 0, 1, 1},
  {&__pyx_n_s_vscale, __pyx_k_vscale, sizeof(__pyx_k_vscale), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_which, __pyx_k_which, sizeof(__pyx_k_which), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 3, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 21, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(2, 83, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 83, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(3, 461, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "SLEPc/slepcbv.pxi":87
 *     if on is not None: n = asInt(on)
 *     if oN is not None: N = asInt(oN)
 *     if n==PETSC_DECIDE and N==PETSC_DECIDE: raise ValueError(             # <<<<<<<<<<<<<<
 *         "local and global sizes cannot be both 'DECIDE'")
 *     # return result to the caller
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_local_and_global_sizes_cannot_be); if (unlikely(!__pyx_tuple_)) __PYX_ERR(2, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "SLEPc/Sys.pyx":26
 *                 out.append(bytes2str(cdate))
 *             if author:
 *                 author = bytes2str(cauthorinfo).split('\n')             # <<<<<<<<<<<<<<
 *                 author = [s.strip() for s in author if s]
 *                 out.append(author)
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(9, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "SLEPc/Sys.pyx":40
 *         cdef const_char *cdate       = SLEPC_VERSION_DATE
 *         cdef const_char *cauthorinfo = SLEPC_AUTHOR_INFO
 *         author = bytes2str(cauthorinfo).split('\n')             # <<<<<<<<<<<<<<
 *         author = [s.strip() for s in author if s]
 *         return dict(major      = cmajor,
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s__2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(9, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "SLEPc/BV.pyx":496
 * 
 *         v = Vec().create(COMM_SELF)
 *         v.setType('seq')             # <<<<<<<<<<<<<<
 *         v.setSizes((DECIDE,k-l))
 *         v.setArray([mval[i] for i in range(0, k - l)])
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_seq); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(3, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "SLEPc/SLEPc.pyx":224
 * # -----------------------------------------------------------------------------
 * 
 * def _initialize(args=None):             # <<<<<<<<<<<<<<
 *     cdef int ready = initialize(args)
 *     if ready: register(NULL)
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_ready); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(4, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);
  __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_n_s_initialize, 224, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(4, 224, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":228
 *     if ready: register(NULL)
 * 
 * def _finalize():             # <<<<<<<<<<<<<<
 *     finalize()
 * 
 */
  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_dalcinl_Devel_slepc4py_dev, __pyx_n_s_finalize, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(19, 1, __pyx_L1_error);
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(19, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initSLEPc(void); /*proto*/
PyMODINIT_FUNC initSLEPc(void)
#else
PyMODINIT_FUNC PyInit_SLEPc(void); /*proto*/
PyMODINIT_FUNC PyInit_SLEPc(void)
#endif
{
  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_RefNannyDeclarations
  #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("PyMODINIT_FUNC PyInit_SLEPc(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(19, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(19, 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 PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("SLEPc", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(19, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(19, 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(19, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(19, 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(19, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_slepc4py__SLEPc) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(19, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "slepc4py.SLEPc")) {
      if (unlikely(PyDict_SetItemString(modules, "slepc4py.SLEPc", __pyx_m) < 0)) __PYX_ERR(19, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  /*--- Global init code ---*/
  __pyx_v_8slepc4py_5SLEPc_PetscError = Py_None; Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("PySlepcST_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_New, "PyObject *(ST)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcST_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcST_Get, "ST (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcBV_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_New, "PyObject *(BV)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcBV_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcBV_Get, "BV (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcDS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_New, "PyObject *(DS)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcDS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcDS_Get, "DS (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_New, "PyObject *(FN)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcFN_Get, "FN (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcRG_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_New, "PyObject *(RG)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcRG_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcRG_Get, "RG (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcEPS_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_New, "PyObject *(EPS)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcEPS_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcEPS_Get, "EPS (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcSVD_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_New, "PyObject *(SVD)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcSVD_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcSVD_Get, "SVD (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcPEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_New, "PyObject *(PEP)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcPEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcPEP_Get, "PEP (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcNEP_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_New, "PyObject *(NEP)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcNEP_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcNEP_Get, "NEP (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcMFN_New", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_New, "PyObject *(MFN)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("PySlepcMFN_Get", (void (*)(void))__pyx_f_8slepc4py_5SLEPc_PySlepcMFN_Get, "MFN (PyObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  /*--- Type init code ---*/
  __pyx_ptype_8petsc4py_5PETSc_Object = __Pyx_ImportType("petsc4py.PETSc", "Object", sizeof(struct PyPetscObjectObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Object)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Object = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Object*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Object->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Object)) __PYX_ERR(19, 1, __pyx_L1_error)
  __pyx_vtabptr_8slepc4py_5SLEPc_ST = &__pyx_vtable_8slepc4py_5SLEPc_ST;
  __pyx_vtable_8slepc4py_5SLEPc_ST.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcST_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcST_Type) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  PySlepcST_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcST_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_ST) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "ST", (PyObject *)&PySlepcST_Type) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  if (PySlepcST_Type.tp_weaklistoffset == 0) PySlepcST_Type.tp_weaklistoffset = offsetof(struct PySlepcSTObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_ST = &PySlepcST_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_BV = &__pyx_vtable_8slepc4py_5SLEPc_BV;
  __pyx_vtable_8slepc4py_5SLEPc_BV.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcBV_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcBV_Type) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
  PySlepcBV_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcBV_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_BV) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "BV", (PyObject *)&PySlepcBV_Type) < 0) __PYX_ERR(3, 46, __pyx_L1_error)
  if (PySlepcBV_Type.tp_weaklistoffset == 0) PySlepcBV_Type.tp_weaklistoffset = offsetof(struct PySlepcBVObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_BV = &PySlepcBV_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_DS = &__pyx_vtable_8slepc4py_5SLEPc_DS;
  __pyx_vtable_8slepc4py_5SLEPc_DS.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcDS_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcDS_Type) < 0) __PYX_ERR(10, 62, __pyx_L1_error)
  PySlepcDS_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcDS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_DS) < 0) __PYX_ERR(10, 62, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "DS", (PyObject *)&PySlepcDS_Type) < 0) __PYX_ERR(10, 62, __pyx_L1_error)
  if (PySlepcDS_Type.tp_weaklistoffset == 0) PySlepcDS_Type.tp_weaklistoffset = offsetof(struct PySlepcDSObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_DS = &PySlepcDS_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_FN = &__pyx_vtable_8slepc4py_5SLEPc_FN;
  __pyx_vtable_8slepc4py_5SLEPc_FN.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcFN_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcFN_Type) < 0) __PYX_ERR(11, 31, __pyx_L1_error)
  PySlepcFN_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_FN) < 0) __PYX_ERR(11, 31, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "FN", (PyObject *)&PySlepcFN_Type) < 0) __PYX_ERR(11, 31, __pyx_L1_error)
  if (PySlepcFN_Type.tp_weaklistoffset == 0) PySlepcFN_Type.tp_weaklistoffset = offsetof(struct PySlepcFNObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_FN = &PySlepcFN_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_RG = &__pyx_vtable_8slepc4py_5SLEPc_RG;
  __pyx_vtable_8slepc4py_5SLEPc_RG.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcRG_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcRG_Type) < 0) __PYX_ERR(12, 14, __pyx_L1_error)
  PySlepcRG_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcRG_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_RG) < 0) __PYX_ERR(12, 14, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "RG", (PyObject *)&PySlepcRG_Type) < 0) __PYX_ERR(12, 14, __pyx_L1_error)
  if (PySlepcRG_Type.tp_weaklistoffset == 0) PySlepcRG_Type.tp_weaklistoffset = offsetof(struct PySlepcRGObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_RG = &PySlepcRG_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_EPS = &__pyx_vtable_8slepc4py_5SLEPc_EPS;
  __pyx_vtable_8slepc4py_5SLEPc_EPS.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcEPS_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcEPS_Type) < 0) __PYX_ERR(13, 209, __pyx_L1_error)
  PySlepcEPS_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcEPS_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_EPS) < 0) __PYX_ERR(13, 209, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "EPS", (PyObject *)&PySlepcEPS_Type) < 0) __PYX_ERR(13, 209, __pyx_L1_error)
  if (PySlepcEPS_Type.tp_weaklistoffset == 0) PySlepcEPS_Type.tp_weaklistoffset = offsetof(struct PySlepcEPSObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_EPS = &PySlepcEPS_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_SVD = &__pyx_vtable_8slepc4py_5SLEPc_SVD;
  __pyx_vtable_8slepc4py_5SLEPc_SVD.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcSVD_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcSVD_Type) < 0) __PYX_ERR(14, 58, __pyx_L1_error)
  PySlepcSVD_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcSVD_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_SVD) < 0) __PYX_ERR(14, 58, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "SVD", (PyObject *)&PySlepcSVD_Type) < 0) __PYX_ERR(14, 58, __pyx_L1_error)
  if (PySlepcSVD_Type.tp_weaklistoffset == 0) PySlepcSVD_Type.tp_weaklistoffset = offsetof(struct PySlepcSVDObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_SVD = &PySlepcSVD_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_PEP = &__pyx_vtable_8slepc4py_5SLEPc_PEP;
  __pyx_vtable_8slepc4py_5SLEPc_PEP.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcPEP_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcPEP_Type) < 0) __PYX_ERR(15, 167, __pyx_L1_error)
  PySlepcPEP_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcPEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_PEP) < 0) __PYX_ERR(15, 167, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "PEP", (PyObject *)&PySlepcPEP_Type) < 0) __PYX_ERR(15, 167, __pyx_L1_error)
  if (PySlepcPEP_Type.tp_weaklistoffset == 0) PySlepcPEP_Type.tp_weaklistoffset = offsetof(struct PySlepcPEPObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_PEP = &PySlepcPEP_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_NEP = &__pyx_vtable_8slepc4py_5SLEPc_NEP;
  __pyx_vtable_8slepc4py_5SLEPc_NEP.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcNEP_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcNEP_Type) < 0) __PYX_ERR(16, 83, __pyx_L1_error)
  PySlepcNEP_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcNEP_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_NEP) < 0) __PYX_ERR(16, 83, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "NEP", (PyObject *)&PySlepcNEP_Type) < 0) __PYX_ERR(16, 83, __pyx_L1_error)
  if (PySlepcNEP_Type.tp_weaklistoffset == 0) PySlepcNEP_Type.tp_weaklistoffset = offsetof(struct PySlepcNEPObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_NEP = &PySlepcNEP_Type;
  __pyx_vtabptr_8slepc4py_5SLEPc_MFN = &__pyx_vtable_8slepc4py_5SLEPc_MFN;
  __pyx_vtable_8slepc4py_5SLEPc_MFN.__pyx_base = *__pyx_vtabptr_8petsc4py_5PETSc_Object;
  PySlepcMFN_Type.tp_base = __pyx_ptype_8petsc4py_5PETSc_Object;
  if (PyType_Ready(&PySlepcMFN_Type) < 0) __PYX_ERR(17, 25, __pyx_L1_error)
  PySlepcMFN_Type.tp_print = 0;
  if (__Pyx_SetVtable(PySlepcMFN_Type.tp_dict, __pyx_vtabptr_8slepc4py_5SLEPc_MFN) < 0) __PYX_ERR(17, 25, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "MFN", (PyObject *)&PySlepcMFN_Type) < 0) __PYX_ERR(17, 25, __pyx_L1_error)
  if (PySlepcMFN_Type.tp_weaklistoffset == 0) PySlepcMFN_Type.tp_weaklistoffset = offsetof(struct PySlepcMFNObject, __pyx_base.__weakref__);
  __pyx_ptype_8slepc4py_5SLEPc_MFN = &PySlepcMFN_Type;
  if (PyType_Ready(&__pyx_type_8slepc4py_5SLEPc__p_mem) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
  __pyx_type_8slepc4py_5SLEPc__p_mem.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "_p_mem", (PyObject *)&__pyx_type_8slepc4py_5SLEPc__p_mem) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
  __pyx_ptype_8slepc4py_5SLEPc__p_mem = &__pyx_type_8slepc4py_5SLEPc__p_mem;
  if (PyType_Ready(&__pyx_type_8slepc4py_5SLEPc_Sys) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  __pyx_type_8slepc4py_5SLEPc_Sys.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "Sys", (PyObject *)&__pyx_type_8slepc4py_5SLEPc_Sys) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  __pyx_ptype_8slepc4py_5SLEPc_Sys = &__pyx_type_8slepc4py_5SLEPc_Sys;
  /*--- Type import code ---*/
  __pyx_ptype_8petsc4py_5PETSc_Comm = __Pyx_ImportType("petsc4py.PETSc", "Comm", sizeof(struct PyPetscCommObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Comm)) __PYX_ERR(20, 70, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Viewer = __Pyx_ImportType("petsc4py.PETSc", "Viewer", sizeof(struct PyPetscViewerObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Viewer)) __PYX_ERR(20, 90, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Viewer = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Viewer*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Viewer->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Viewer)) __PYX_ERR(20, 90, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Random = __Pyx_ImportType("petsc4py.PETSc", "Random", sizeof(struct PyPetscRandomObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Random)) __PYX_ERR(20, 96, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Random = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Random*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Random->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Random)) __PYX_ERR(20, 96, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_IS = __Pyx_ImportType("petsc4py.PETSc", "IS", sizeof(struct PyPetscISObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_IS)) __PYX_ERR(20, 102, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_IS = (struct __pyx_vtabstruct_8petsc4py_5PETSc_IS*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_IS->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_IS)) __PYX_ERR(20, 102, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_LGMap = __Pyx_ImportType("petsc4py.PETSc", "LGMap", sizeof(struct PyPetscLGMapObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_LGMap)) __PYX_ERR(20, 108, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_LGMap = (struct __pyx_vtabstruct_8petsc4py_5PETSc_LGMap*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_LGMap->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_LGMap)) __PYX_ERR(20, 108, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_SF = __Pyx_ImportType("petsc4py.PETSc", "SF", sizeof(struct PyPetscSFObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_SF)) __PYX_ERR(20, 114, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_SF = (struct __pyx_vtabstruct_8petsc4py_5PETSc_SF*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_SF->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_SF)) __PYX_ERR(20, 114, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Vec = __Pyx_ImportType("petsc4py.PETSc", "Vec", sizeof(struct PyPetscVecObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Vec)) __PYX_ERR(20, 120, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Vec = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Vec*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Vec->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Vec)) __PYX_ERR(20, 120, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Scatter = __Pyx_ImportType("petsc4py.PETSc", "Scatter", sizeof(struct PyPetscScatterObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Scatter)) __PYX_ERR(20, 126, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Scatter = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Scatter*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Scatter->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Scatter)) __PYX_ERR(20, 126, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Section = __Pyx_ImportType("petsc4py.PETSc", "Section", sizeof(struct PyPetscSectionObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Section)) __PYX_ERR(20, 132, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Section = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Section*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Section->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Section)) __PYX_ERR(20, 132, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Mat = __Pyx_ImportType("petsc4py.PETSc", "Mat", sizeof(struct PyPetscMatObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Mat)) __PYX_ERR(20, 138, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Mat = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Mat*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Mat->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Mat)) __PYX_ERR(20, 138, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_NullSpace = __Pyx_ImportType("petsc4py.PETSc", "NullSpace", sizeof(struct PyPetscNullSpaceObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_NullSpace)) __PYX_ERR(20, 144, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_NullSpace = (struct __pyx_vtabstruct_8petsc4py_5PETSc_NullSpace*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_NullSpace->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_NullSpace)) __PYX_ERR(20, 144, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_PC = __Pyx_ImportType("petsc4py.PETSc", "PC", sizeof(struct PyPetscPCObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_PC)) __PYX_ERR(20, 150, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_PC = (struct __pyx_vtabstruct_8petsc4py_5PETSc_PC*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_PC->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_PC)) __PYX_ERR(20, 150, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_KSP = __Pyx_ImportType("petsc4py.PETSc", "KSP", sizeof(struct PyPetscKSPObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_KSP)) __PYX_ERR(20, 156, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_KSP = (struct __pyx_vtabstruct_8petsc4py_5PETSc_KSP*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_KSP->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_KSP)) __PYX_ERR(20, 156, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_SNES = __Pyx_ImportType("petsc4py.PETSc", "SNES", sizeof(struct PyPetscSNESObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_SNES)) __PYX_ERR(20, 162, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_SNES = (struct __pyx_vtabstruct_8petsc4py_5PETSc_SNES*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_SNES->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_SNES)) __PYX_ERR(20, 162, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_TS = __Pyx_ImportType("petsc4py.PETSc", "TS", sizeof(struct PyPetscTSObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_TS)) __PYX_ERR(20, 168, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_TS = (struct __pyx_vtabstruct_8petsc4py_5PETSc_TS*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_TS->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_TS)) __PYX_ERR(20, 168, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_TAO = __Pyx_ImportType("petsc4py.PETSc", "TAO", sizeof(struct PyPetscTAOObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_TAO)) __PYX_ERR(20, 174, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_TAO = (struct __pyx_vtabstruct_8petsc4py_5PETSc_TAO*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_TAO->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_TAO)) __PYX_ERR(20, 174, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_AO = __Pyx_ImportType("petsc4py.PETSc", "AO", sizeof(struct PyPetscAOObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_AO)) __PYX_ERR(20, 180, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_AO = (struct __pyx_vtabstruct_8petsc4py_5PETSc_AO*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_AO->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_AO)) __PYX_ERR(20, 180, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_DM = __Pyx_ImportType("petsc4py.PETSc", "DM", sizeof(struct PyPetscDMObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_DM)) __PYX_ERR(20, 186, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_DM = (struct __pyx_vtabstruct_8petsc4py_5PETSc_DM*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_DM->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_DM)) __PYX_ERR(20, 186, __pyx_L1_error)
  __pyx_ptype_8petsc4py_5PETSc_Partitioner = __Pyx_ImportType("petsc4py.PETSc", "Partitioner", sizeof(struct PyPetscPartitionerObject), 1); if (unlikely(!__pyx_ptype_8petsc4py_5PETSc_Partitioner)) __PYX_ERR(20, 192, __pyx_L1_error)
  __pyx_vtabptr_8petsc4py_5PETSc_Partitioner = (struct __pyx_vtabstruct_8petsc4py_5PETSc_Partitioner*)__Pyx_GetVtable(__pyx_ptype_8petsc4py_5PETSc_Partitioner->tp_dict); if (unlikely(!__pyx_vtabptr_8petsc4py_5PETSc_Partitioner)) __PYX_ERR(20, 192, __pyx_L1_error)
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  __pyx_t_1 = __Pyx_ImportModule("petsc4py.PETSc"); if (!__pyx_t_1) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "GetComm", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetComm, "MPI_Comm (PyObject *, MPI_Comm)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "GetCommDefault", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_GetCommDefault, "MPI_Comm (void)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "PyPetscType_Register", (void (**)(void))&__pyx_f_8petsc4py_5PETSc_PyPetscType_Register, "int (int, PyTypeObject *)") < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(19, 1, __pyx_L1_error)
  #endif

  /* "SLEPc/SLEPc.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * from petsc4py.PETSc import COMM_NULL             # <<<<<<<<<<<<<<
 * from petsc4py.PETSc import COMM_SELF
 * from petsc4py.PETSc import COMM_WORLD
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_COMM_NULL);
  __Pyx_GIVEREF(__pyx_n_s_COMM_NULL);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_COMM_NULL);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_COMM_NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_NULL, __pyx_t_2) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "SLEPc/SLEPc.pyx":4
 * 
 * from petsc4py.PETSc import COMM_NULL
 * from petsc4py.PETSc import COMM_SELF             # <<<<<<<<<<<<<<
 * from petsc4py.PETSc import COMM_WORLD
 * 
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_COMM_SELF);
  __Pyx_GIVEREF(__pyx_n_s_COMM_SELF);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_COMM_SELF);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_SELF, __pyx_t_3) < 0) __PYX_ERR(4, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":5
 * from petsc4py.PETSc import COMM_NULL
 * from petsc4py.PETSc import COMM_SELF
 * from petsc4py.PETSc import COMM_WORLD             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_COMM_WORLD);
  __Pyx_GIVEREF(__pyx_n_s_COMM_WORLD);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_COMM_WORLD);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_COMM_WORLD); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_WORLD, __pyx_t_2) < 0) __PYX_ERR(4, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "SLEPc/SLEPc.pyx":62
 *     void *PyExc_RuntimeError
 * 
 * cdef object PetscError = <object>PyExc_RuntimeError             # <<<<<<<<<<<<<<
 * from petsc4py.PETSc import Error as PetscError
 * 
 */
  __pyx_t_3 = ((PyObject *)PyExc_RuntimeError);
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError);
  __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "SLEPc/SLEPc.pyx":63
 * 
 * cdef object PetscError = <object>PyExc_RuntimeError
 * from petsc4py.PETSc import Error as PetscError             # <<<<<<<<<<<<<<
 * 
 * cdef inline int SETERR(int ierr) with gil:
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_Error);
  __Pyx_GIVEREF(__pyx_n_s_Error);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_petsc4py_PETSc, __pyx_t_3, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Error); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_XGOTREF(__pyx_v_8slepc4py_5SLEPc_PetscError);
  __Pyx_DECREF_SET(__pyx_v_8slepc4py_5SLEPc_PetscError, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":136
 * 
 * __doc__ = \
 * """             # <<<<<<<<<<<<<<
 * Scalable Library for Eigenvalue Problem Computations.
 * """
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_doc, __pyx_kp_s_Scalable_Library_for_Eigenvalue) < 0) __PYX_ERR(4, 135, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":140
 * """
 * 
 * DECIDE    = PETSC_DECIDE             # <<<<<<<<<<<<<<
 * DEFAULT   = PETSC_DEFAULT
 * DETERMINE = PETSC_DETERMINE
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DECIDE); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DECIDE, __pyx_t_2) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":141
 * 
 * DECIDE    = PETSC_DECIDE
 * DEFAULT   = PETSC_DEFAULT             # <<<<<<<<<<<<<<
 * DETERMINE = PETSC_DETERMINE
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEFAULT, __pyx_t_2) < 0) __PYX_ERR(4, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":142
 * DECIDE    = PETSC_DECIDE
 * DEFAULT   = PETSC_DEFAULT
 * DETERMINE = PETSC_DETERMINE             # <<<<<<<<<<<<<<
 * 
 * include "Sys.pyx"
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(PETSC_DETERMINE); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DETERMINE, __pyx_t_2) < 0) __PYX_ERR(4, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/Sys.pyx":6
 * 
 *     @classmethod
 *     def getVersion(cls, patch=False, devel=False,             # <<<<<<<<<<<<<<
 *                    date=False, author=False):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 */
  __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersion); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "SLEPc/Sys.pyx":5
 * cdef class Sys:
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def getVersion(cls, patch=False, devel=False,
 *                    date=False, author=False):
 */
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersion, __pyx_t_3) < 0) __PYX_ERR(9, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys);

  /* "SLEPc/Sys.pyx":32
 * 
 *     @classmethod
 *     def getVersionInfo(cls):             # <<<<<<<<<<<<<<
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 *         cdef int cminor = SLEPC_VERSION_MINOR
 */
  __pyx_t_3 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys, __pyx_n_s_getVersionInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "SLEPc/Sys.pyx":31
 *         return tuple(out)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def getVersionInfo(cls):
 *         cdef int cmajor = SLEPC_VERSION_MAJOR
 */
  __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_Sys->tp_dict, __pyx_n_s_getVersionInfo, __pyx_t_2) < 0) __PYX_ERR(9, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_Sys);

  /* "SLEPc/ST.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class STType(object):             # <<<<<<<<<<<<<<
 *     """
 *     ST types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_STType, __pyx_n_s_STType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_ST_types_SHELL_User_defined_SHI); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/ST.pyx":13
 *     - `PRECOND`: Preconditioner.
 *     """
 *     SHELL   = S_(STSHELL)             # <<<<<<<<<<<<<<
 *     SHIFT   = S_(STSHIFT)
 *     SINVERT = S_(STSINVERT)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSHELL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHELL, __pyx_t_5) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":14
 *     """
 *     SHELL   = S_(STSHELL)
 *     SHIFT   = S_(STSHIFT)             # <<<<<<<<<<<<<<
 *     SINVERT = S_(STSINVERT)
 *     CAYLEY  = S_(STCAYLEY)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSHIFT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHIFT, __pyx_t_5) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":15
 *     SHELL   = S_(STSHELL)
 *     SHIFT   = S_(STSHIFT)
 *     SINVERT = S_(STSINVERT)             # <<<<<<<<<<<<<<
 *     CAYLEY  = S_(STCAYLEY)
 *     PRECOND = S_(STPRECOND)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STSINVERT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SINVERT, __pyx_t_5) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":16
 *     SHIFT   = S_(STSHIFT)
 *     SINVERT = S_(STSINVERT)
 *     CAYLEY  = S_(STCAYLEY)             # <<<<<<<<<<<<<<
 *     PRECOND = S_(STPRECOND)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STCAYLEY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CAYLEY, __pyx_t_5) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":17
 *     SINVERT = S_(STSINVERT)
 *     CAYLEY  = S_(STCAYLEY)
 *     PRECOND = S_(STPRECOND)             # <<<<<<<<<<<<<<
 * 
 * class STMatMode(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(STPRECOND); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECOND, __pyx_t_5) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class STType(object):             # <<<<<<<<<<<<<<
 *     """
 *     ST types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_STType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STType, __pyx_t_5) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/ST.pyx":19
 *     PRECOND = S_(STPRECOND)
 * 
 * class STMatMode(object):             # <<<<<<<<<<<<<<
 *     """
 *     ST matrix mode
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_STMatMode, __pyx_n_s_STMatMode, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_ST_matrix_mode_COPY_A_working_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/ST.pyx":28
 *       implicit matrix.
 *     """
 *     COPY    = ST_MATMODE_COPY             # <<<<<<<<<<<<<<
 *     INPLACE = ST_MATMODE_INPLACE
 *     SHELL   = ST_MATMODE_SHELL
 */
  __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_COPY); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COPY, __pyx_t_5) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":29
 *     """
 *     COPY    = ST_MATMODE_COPY
 *     INPLACE = ST_MATMODE_INPLACE             # <<<<<<<<<<<<<<
 *     SHELL   = ST_MATMODE_SHELL
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_INPLACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INPLACE, __pyx_t_5) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":30
 *     COPY    = ST_MATMODE_COPY
 *     INPLACE = ST_MATMODE_INPLACE
 *     SHELL   = ST_MATMODE_SHELL             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_STMatMode(ST_MATMODE_SHELL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SHELL, __pyx_t_5) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/ST.pyx":19
 *     PRECOND = S_(STPRECOND)
 * 
 * class STMatMode(object):             # <<<<<<<<<<<<<<
 *     """
 *     ST matrix mode
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_STMatMode, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_STMatMode, __pyx_t_5) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/ST.pyx":40
 *     """
 * 
 *     Type         = STType             # <<<<<<<<<<<<<<
 *     MatMode      = STMatMode
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST);

  /* "SLEPc/ST.pyx":41
 * 
 *     Type         = STType
 *     MatMode      = STMatMode             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STMatMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_ST->tp_dict, __pyx_n_s_MatMode, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_ST);

  /* "SLEPc/ST.pyx":469
 * # -----------------------------------------------------------------------------
 * 
 * del STType             # <<<<<<<<<<<<<<
 * del STMatMode
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STType) < 0) __PYX_ERR(0, 469, __pyx_L1_error)

  /* "SLEPc/ST.pyx":470
 * 
 * del STType
 * del STMatMode             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_STMatMode) < 0) __PYX_ERR(0, 470, __pyx_L1_error)

  /* "SLEPc/BV.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class BVType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVType, __pyx_n_s_BVType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/BV.pyx":7
 *     BV type
 *     """
 *     MAT        = S_(BVMAT)             # <<<<<<<<<<<<<<
 *     SVEC       = S_(BVSVEC)
 *     VECS       = S_(BVVECS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVMAT); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MAT, __pyx_t_5) < 0) __PYX_ERR(3, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":8
 *     """
 *     MAT        = S_(BVMAT)
 *     SVEC       = S_(BVSVEC)             # <<<<<<<<<<<<<<
 *     VECS       = S_(BVVECS)
 *     CONTIGUOUS = S_(BVCONTIGUOUS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVSVEC); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SVEC, __pyx_t_5) < 0) __PYX_ERR(3, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":9
 *     MAT        = S_(BVMAT)
 *     SVEC       = S_(BVSVEC)
 *     VECS       = S_(BVVECS)             # <<<<<<<<<<<<<<
 *     CONTIGUOUS = S_(BVCONTIGUOUS)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVVECS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_VECS, __pyx_t_5) < 0) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":10
 *     SVEC       = S_(BVSVEC)
 *     VECS       = S_(BVVECS)
 *     CONTIGUOUS = S_(BVCONTIGUOUS)             # <<<<<<<<<<<<<<
 * 
 * class BVOrthogType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(BVCONTIGUOUS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONTIGUOUS, __pyx_t_5) < 0) __PYX_ERR(3, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class BVType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVType, __pyx_t_5) < 0) __PYX_ERR(3, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/BV.pyx":12
 *     CONTIGUOUS = S_(BVCONTIGUOUS)
 * 
 * class BVOrthogType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV orthogonalization types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogType, __pyx_n_s_BVOrthogType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_orthogonalization_types_CGS); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/BV.pyx":19
 *     - `MGS`: Modified Gram-Schmidt.
 *     """
 *     CGS = BV_ORTHOG_CGS             # <<<<<<<<<<<<<<
 *     MGS = BV_ORTHOG_MGS
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_CGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CGS, __pyx_t_5) < 0) __PYX_ERR(3, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":20
 *     """
 *     CGS = BV_ORTHOG_CGS
 *     MGS = BV_ORTHOG_MGS             # <<<<<<<<<<<<<<
 * 
 * class BVOrthogRefineType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogType(BV_ORTHOG_MGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MGS, __pyx_t_5) < 0) __PYX_ERR(3, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":12
 *     CONTIGUOUS = S_(BVCONTIGUOUS)
 * 
 * class BVOrthogType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV orthogonalization types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogType, __pyx_t_5) < 0) __PYX_ERR(3, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/BV.pyx":22
 *     MGS = BV_ORTHOG_MGS
 * 
 * class BVOrthogRefineType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV orthogonalization refinement types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogRefineType, __pyx_n_s_BVOrthogRefineType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_orthogonalization_refinement); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/BV.pyx":30
 *     - `ALWAYS`:   Always reorthogonalize.
 *     """
 *     IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED             # <<<<<<<<<<<<<<
 *     NEVER    = BV_ORTHOG_REFINE_NEVER
 *     ALWAYS   = BV_ORTHOG_REFINE_ALWAYS
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_IFNEEDED); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_IFNEEDED, __pyx_t_5) < 0) __PYX_ERR(3, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":31
 *     """
 *     IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED
 *     NEVER    = BV_ORTHOG_REFINE_NEVER             # <<<<<<<<<<<<<<
 *     ALWAYS   = BV_ORTHOG_REFINE_ALWAYS
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_NEVER); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NEVER, __pyx_t_5) < 0) __PYX_ERR(3, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":32
 *     IFNEEDED = BV_ORTHOG_REFINE_IFNEEDED
 *     NEVER    = BV_ORTHOG_REFINE_NEVER
 *     ALWAYS   = BV_ORTHOG_REFINE_ALWAYS             # <<<<<<<<<<<<<<
 * 
 * class BVOrthogBlockType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogRefineType(BV_ORTHOG_REFINE_ALWAYS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALWAYS, __pyx_t_5) < 0) __PYX_ERR(3, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":22
 *     MGS = BV_ORTHOG_MGS
 * 
 * class BVOrthogRefineType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV orthogonalization refinement types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogRefineType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogRefineType, __pyx_t_5) < 0) __PYX_ERR(3, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/BV.pyx":34
 *     ALWAYS   = BV_ORTHOG_REFINE_ALWAYS
 * 
 * class BVOrthogBlockType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV block-orthogonalization types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_BVOrthogBlockType, __pyx_n_s_BVOrthogBlockType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_BV_block_orthogonalization_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/BV.pyx":41
 *     - `CHOL`: Cholesky.
 *     """
 *     GS   = BV_ORTHOG_BLOCK_GS             # <<<<<<<<<<<<<<
 *     CHOL = BV_ORTHOG_BLOCK_CHOL
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_GS); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GS, __pyx_t_5) < 0) __PYX_ERR(3, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":42
 *     """
 *     GS   = BV_ORTHOG_BLOCK_GS
 *     CHOL = BV_ORTHOG_BLOCK_CHOL             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_BVOrthogBlockType(BV_ORTHOG_BLOCK_CHOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHOL, __pyx_t_5) < 0) __PYX_ERR(3, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/BV.pyx":34
 *     ALWAYS   = BV_ORTHOG_REFINE_ALWAYS
 * 
 * class BVOrthogBlockType(object):             # <<<<<<<<<<<<<<
 *     """
 *     BV block-orthogonalization types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_BVOrthogBlockType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BVOrthogBlockType, __pyx_t_5) < 0) __PYX_ERR(3, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/BV.pyx":52
 *     """
 * 
 *     Type             = BVType             # <<<<<<<<<<<<<<
 *     OrthogType       = BVOrthogType
 *     OrthogRefineType = BVOrthogRefineType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(3, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":53
 * 
 *     Type             = BVType
 *     OrthogType       = BVOrthogType             # <<<<<<<<<<<<<<
 *     OrthogRefineType = BVOrthogRefineType
 *     RefineType       = BVOrthogRefineType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogType, __pyx_t_2) < 0) __PYX_ERR(3, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":54
 *     Type             = BVType
 *     OrthogType       = BVOrthogType
 *     OrthogRefineType = BVOrthogRefineType             # <<<<<<<<<<<<<<
 *     RefineType       = BVOrthogRefineType
 *     OrthogBlockType  = BVOrthogBlockType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogRefineType, __pyx_t_2) < 0) __PYX_ERR(3, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":55
 *     OrthogType       = BVOrthogType
 *     OrthogRefineType = BVOrthogRefineType
 *     RefineType       = BVOrthogRefineType             # <<<<<<<<<<<<<<
 *     OrthogBlockType  = BVOrthogBlockType
 *     BlockType        = BVOrthogBlockType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogRefineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_RefineType, __pyx_t_2) < 0) __PYX_ERR(3, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":56
 *     OrthogRefineType = BVOrthogRefineType
 *     RefineType       = BVOrthogRefineType
 *     OrthogBlockType  = BVOrthogBlockType             # <<<<<<<<<<<<<<
 *     BlockType        = BVOrthogBlockType
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_OrthogBlockType, __pyx_t_2) < 0) __PYX_ERR(3, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":57
 *     RefineType       = BVOrthogRefineType
 *     OrthogBlockType  = BVOrthogBlockType
 *     BlockType        = BVOrthogBlockType             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_BVOrthogBlockType); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_BV->tp_dict, __pyx_n_s_BlockType, __pyx_t_2) < 0) __PYX_ERR(3, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_BV);

  /* "SLEPc/BV.pyx":845
 * # -----------------------------------------------------------------------------
 * 
 * del BVType             # <<<<<<<<<<<<<<
 * del BVOrthogType
 * del BVOrthogRefineType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVType) < 0) __PYX_ERR(3, 845, __pyx_L1_error)

  /* "SLEPc/BV.pyx":846
 * 
 * del BVType
 * del BVOrthogType             # <<<<<<<<<<<<<<
 * del BVOrthogRefineType
 * del BVOrthogBlockType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogType) < 0) __PYX_ERR(3, 846, __pyx_L1_error)

  /* "SLEPc/BV.pyx":847
 * del BVType
 * del BVOrthogType
 * del BVOrthogRefineType             # <<<<<<<<<<<<<<
 * del BVOrthogBlockType
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogRefineType) < 0) __PYX_ERR(3, 847, __pyx_L1_error)

  /* "SLEPc/BV.pyx":848
 * del BVOrthogType
 * del BVOrthogRefineType
 * del BVOrthogBlockType             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_BVOrthogBlockType) < 0) __PYX_ERR(3, 848, __pyx_L1_error)

  /* "SLEPc/DS.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class DSType(object):             # <<<<<<<<<<<<<<
 *     """
 *     DS type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSType, __pyx_n_s_DSType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_DS_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/DS.pyx":7
 *     DS type
 *     """
 *     HEP     = S_(DSHEP)             # <<<<<<<<<<<<<<
 *     NHEP    = S_(DSNHEP)
 *     GHEP    = S_(DSGHEP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HEP, __pyx_t_5) < 0) __PYX_ERR(10, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":8
 *     """
 *     HEP     = S_(DSHEP)
 *     NHEP    = S_(DSNHEP)             # <<<<<<<<<<<<<<
 *     GHEP    = S_(DSGHEP)
 *     GHIEP   = S_(DSGHIEP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NHEP, __pyx_t_5) < 0) __PYX_ERR(10, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":9
 *     HEP     = S_(DSHEP)
 *     NHEP    = S_(DSNHEP)
 *     GHEP    = S_(DSGHEP)             # <<<<<<<<<<<<<<
 *     GHIEP   = S_(DSGHIEP)
 *     GNHEP   = S_(DSGNHEP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHEP, __pyx_t_5) < 0) __PYX_ERR(10, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":10
 *     NHEP    = S_(DSNHEP)
 *     GHEP    = S_(DSGHEP)
 *     GHIEP   = S_(DSGHIEP)             # <<<<<<<<<<<<<<
 *     GNHEP   = S_(DSGNHEP)
 *     SVD     = S_(DSSVD)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGHIEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHIEP, __pyx_t_5) < 0) __PYX_ERR(10, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":11
 *     GHEP    = S_(DSGHEP)
 *     GHIEP   = S_(DSGHIEP)
 *     GNHEP   = S_(DSGNHEP)             # <<<<<<<<<<<<<<
 *     SVD     = S_(DSSVD)
 *     PEP     = S_(DSPEP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSGNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GNHEP, __pyx_t_5) < 0) __PYX_ERR(10, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":12
 *     GHIEP   = S_(DSGHIEP)
 *     GNHEP   = S_(DSGNHEP)
 *     SVD     = S_(DSSVD)             # <<<<<<<<<<<<<<
 *     PEP     = S_(DSPEP)
 *     NEP     = S_(DSNEP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSSVD); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SVD, __pyx_t_5) < 0) __PYX_ERR(10, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":13
 *     GNHEP   = S_(DSGNHEP)
 *     SVD     = S_(DSSVD)
 *     PEP     = S_(DSPEP)             # <<<<<<<<<<<<<<
 *     NEP     = S_(DSNEP)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSPEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PEP, __pyx_t_5) < 0) __PYX_ERR(10, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":14
 *     SVD     = S_(DSSVD)
 *     PEP     = S_(DSPEP)
 *     NEP     = S_(DSNEP)             # <<<<<<<<<<<<<<
 * 
 * class DSStateType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(DSNEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NEP, __pyx_t_5) < 0) __PYX_ERR(10, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class DSType(object):             # <<<<<<<<<<<<<<
 *     """
 *     DS type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSType, __pyx_t_5) < 0) __PYX_ERR(10, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/DS.pyx":16
 *     NEP     = S_(DSNEP)
 * 
 * class DSStateType(object):             # <<<<<<<<<<<<<<
 *     """
 *     DS state types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSStateType, __pyx_n_s_DSStateType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_DS_state_types_RAW_Not_processe); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/DS.pyx":25
 *     - `TRUNCATED`: Condensed form truncated to a smaller size.
 *     """
 *     RAW          = DS_STATE_RAW             # <<<<<<<<<<<<<<
 *     INTERMEDIATE = DS_STATE_INTERMEDIATE
 *     CONDENSED    = DS_STATE_CONDENSED
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_RAW); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RAW, __pyx_t_5) < 0) __PYX_ERR(10, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":26
 *     """
 *     RAW          = DS_STATE_RAW
 *     INTERMEDIATE = DS_STATE_INTERMEDIATE             # <<<<<<<<<<<<<<
 *     CONDENSED    = DS_STATE_CONDENSED
 *     TRUNCATED    = DS_STATE_TRUNCATED
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_INTERMEDIATE); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERMEDIATE, __pyx_t_5) < 0) __PYX_ERR(10, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":27
 *     RAW          = DS_STATE_RAW
 *     INTERMEDIATE = DS_STATE_INTERMEDIATE
 *     CONDENSED    = DS_STATE_CONDENSED             # <<<<<<<<<<<<<<
 *     TRUNCATED    = DS_STATE_TRUNCATED
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_CONDENSED); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONDENSED, __pyx_t_5) < 0) __PYX_ERR(10, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":28
 *     INTERMEDIATE = DS_STATE_INTERMEDIATE
 *     CONDENSED    = DS_STATE_CONDENSED
 *     TRUNCATED    = DS_STATE_TRUNCATED             # <<<<<<<<<<<<<<
 * 
 * class DSMatType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSStateType(DS_STATE_TRUNCATED); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRUNCATED, __pyx_t_5) < 0) __PYX_ERR(10, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":16
 *     NEP     = S_(DSNEP)
 * 
 * class DSStateType(object):             # <<<<<<<<<<<<<<
 *     """
 *     DS state types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSStateType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSStateType, __pyx_t_5) < 0) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/DS.pyx":30
 *     TRUNCATED    = DS_STATE_TRUNCATED
 * 
 * class DSMatType(object):             # <<<<<<<<<<<<<<
 *     """
 *     To refer to one of the matrices stored internally in DS
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_DSMatType, __pyx_n_s_DSMatType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_To_refer_to_one_of_the_matrices); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/DS.pyx":47
 *     - `W`:  workspace matrix.
 *     """
 *     A  = DS_MAT_A             # <<<<<<<<<<<<<<
 *     B  = DS_MAT_B
 *     C  = DS_MAT_C
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_A); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_A, __pyx_t_5) < 0) __PYX_ERR(10, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":48
 *     """
 *     A  = DS_MAT_A
 *     B  = DS_MAT_B             # <<<<<<<<<<<<<<
 *     C  = DS_MAT_C
 *     T  = DS_MAT_T
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_B); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_B, __pyx_t_5) < 0) __PYX_ERR(10, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":49
 *     A  = DS_MAT_A
 *     B  = DS_MAT_B
 *     C  = DS_MAT_C             # <<<<<<<<<<<<<<
 *     T  = DS_MAT_T
 *     D  = DS_MAT_D
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_C); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_C, __pyx_t_5) < 0) __PYX_ERR(10, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":50
 *     B  = DS_MAT_B
 *     C  = DS_MAT_C
 *     T  = DS_MAT_T             # <<<<<<<<<<<<<<
 *     D  = DS_MAT_D
 *     Q  = DS_MAT_Q
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_T); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_T, __pyx_t_5) < 0) __PYX_ERR(10, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":51
 *     C  = DS_MAT_C
 *     T  = DS_MAT_T
 *     D  = DS_MAT_D             # <<<<<<<<<<<<<<
 *     Q  = DS_MAT_Q
 *     Z  = DS_MAT_Z
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_D); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_D, __pyx_t_5) < 0) __PYX_ERR(10, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":52
 *     T  = DS_MAT_T
 *     D  = DS_MAT_D
 *     Q  = DS_MAT_Q             # <<<<<<<<<<<<<<
 *     Z  = DS_MAT_Z
 *     X  = DS_MAT_X
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Q); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Q, __pyx_t_5) < 0) __PYX_ERR(10, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":53
 *     D  = DS_MAT_D
 *     Q  = DS_MAT_Q
 *     Z  = DS_MAT_Z             # <<<<<<<<<<<<<<
 *     X  = DS_MAT_X
 *     Y  = DS_MAT_Y
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Z); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Z, __pyx_t_5) < 0) __PYX_ERR(10, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":54
 *     Q  = DS_MAT_Q
 *     Z  = DS_MAT_Z
 *     X  = DS_MAT_X             # <<<<<<<<<<<<<<
 *     Y  = DS_MAT_Y
 *     U  = DS_MAT_U
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_X); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_X, __pyx_t_5) < 0) __PYX_ERR(10, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":55
 *     Z  = DS_MAT_Z
 *     X  = DS_MAT_X
 *     Y  = DS_MAT_Y             # <<<<<<<<<<<<<<
 *     U  = DS_MAT_U
 *     VT = DS_MAT_VT
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_Y); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_Y, __pyx_t_5) < 0) __PYX_ERR(10, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":56
 *     X  = DS_MAT_X
 *     Y  = DS_MAT_Y
 *     U  = DS_MAT_U             # <<<<<<<<<<<<<<
 *     VT = DS_MAT_VT
 *     W  = DS_MAT_W
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_U); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_U, __pyx_t_5) < 0) __PYX_ERR(10, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":57
 *     Y  = DS_MAT_Y
 *     U  = DS_MAT_U
 *     VT = DS_MAT_VT             # <<<<<<<<<<<<<<
 *     W  = DS_MAT_W
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_VT); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_VT, __pyx_t_5) < 0) __PYX_ERR(10, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":58
 *     U  = DS_MAT_U
 *     VT = DS_MAT_VT
 *     W  = DS_MAT_W             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_DSMatType(DS_MAT_W); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_W, __pyx_t_5) < 0) __PYX_ERR(10, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/DS.pyx":30
 *     TRUNCATED    = DS_STATE_TRUNCATED
 * 
 * class DSMatType(object):             # <<<<<<<<<<<<<<
 *     """
 *     To refer to one of the matrices stored internally in DS
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_DSMatType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DSMatType, __pyx_t_5) < 0) __PYX_ERR(10, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/DS.pyx":68
 *     """
 * 
 *     Type      = DSType             # <<<<<<<<<<<<<<
 *     StateType = DSStateType
 *     MatType   = DSMatType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(10, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS);

  /* "SLEPc/DS.pyx":69
 * 
 *     Type      = DSType
 *     StateType = DSStateType             # <<<<<<<<<<<<<<
 *     MatType   = DSMatType
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSStateType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_StateType, __pyx_t_2) < 0) __PYX_ERR(10, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS);

  /* "SLEPc/DS.pyx":70
 *     Type      = DSType
 *     StateType = DSStateType
 *     MatType   = DSMatType             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DSMatType); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_DS->tp_dict, __pyx_n_s_MatType, __pyx_t_2) < 0) __PYX_ERR(10, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_DS);

  /* "SLEPc/DS.pyx":468
 * # -----------------------------------------------------------------------------
 * 
 * del DSType             # <<<<<<<<<<<<<<
 * del DSStateType
 * del DSMatType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSType) < 0) __PYX_ERR(10, 468, __pyx_L1_error)

  /* "SLEPc/DS.pyx":469
 * 
 * del DSType
 * del DSStateType             # <<<<<<<<<<<<<<
 * del DSMatType
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSStateType) < 0) __PYX_ERR(10, 469, __pyx_L1_error)

  /* "SLEPc/DS.pyx":470
 * del DSType
 * del DSStateType
 * del DSMatType             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_DSMatType) < 0) __PYX_ERR(10, 470, __pyx_L1_error)

  /* "SLEPc/FN.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class FNType(object):             # <<<<<<<<<<<<<<
 *     """
 *     FN type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_FNType, __pyx_n_s_FNType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_FN_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/FN.pyx":7
 *     FN type
 *     """
 *     COMBINE  = S_(FNCOMBINE)             # <<<<<<<<<<<<<<
 *     RATIONAL = S_(FNRATIONAL)
 *     EXP      = S_(FNEXP)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNCOMBINE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COMBINE, __pyx_t_5) < 0) __PYX_ERR(11, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":8
 *     """
 *     COMBINE  = S_(FNCOMBINE)
 *     RATIONAL = S_(FNRATIONAL)             # <<<<<<<<<<<<<<
 *     EXP      = S_(FNEXP)
 *     LOG      = S_(FNLOG)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNRATIONAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RATIONAL, __pyx_t_5) < 0) __PYX_ERR(11, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":9
 *     COMBINE  = S_(FNCOMBINE)
 *     RATIONAL = S_(FNRATIONAL)
 *     EXP      = S_(FNEXP)             # <<<<<<<<<<<<<<
 *     LOG      = S_(FNLOG)
 *     PHI      = S_(FNPHI)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNEXP); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXP, __pyx_t_5) < 0) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":10
 *     RATIONAL = S_(FNRATIONAL)
 *     EXP      = S_(FNEXP)
 *     LOG      = S_(FNLOG)             # <<<<<<<<<<<<<<
 *     PHI      = S_(FNPHI)
 *     SQRT     = S_(FNSQRT)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNLOG); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOG, __pyx_t_5) < 0) __PYX_ERR(11, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":11
 *     EXP      = S_(FNEXP)
 *     LOG      = S_(FNLOG)
 *     PHI      = S_(FNPHI)             # <<<<<<<<<<<<<<
 *     SQRT     = S_(FNSQRT)
 *     INVSQRT  = S_(FNINVSQRT)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNPHI); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PHI, __pyx_t_5) < 0) __PYX_ERR(11, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":12
 *     LOG      = S_(FNLOG)
 *     PHI      = S_(FNPHI)
 *     SQRT     = S_(FNSQRT)             # <<<<<<<<<<<<<<
 *     INVSQRT  = S_(FNINVSQRT)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNSQRT); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SQRT, __pyx_t_5) < 0) __PYX_ERR(11, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":13
 *     PHI      = S_(FNPHI)
 *     SQRT     = S_(FNSQRT)
 *     INVSQRT  = S_(FNINVSQRT)             # <<<<<<<<<<<<<<
 * 
 * class FNCombineType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(FNINVSQRT); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INVSQRT, __pyx_t_5) < 0) __PYX_ERR(11, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class FNType(object):             # <<<<<<<<<<<<<<
 *     """
 *     FN type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_FNType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNType, __pyx_t_5) < 0) __PYX_ERR(11, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/FN.pyx":15
 *     INVSQRT  = S_(FNINVSQRT)
 * 
 * class FNCombineType(object):             # <<<<<<<<<<<<<<
 *     """
 *     FN type of combination of child functions
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_FNCombineType, __pyx_n_s_FNCombineType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_FN_type_of_combination_of_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/FN.pyx":24
 *     - `COMPOSE`:   Composition      f(x) = f2(f1(x))
 *     """
 *     ADD      = FN_COMBINE_ADD             # <<<<<<<<<<<<<<
 *     MULTIPLY = FN_COMBINE_MULTIPLY
 *     DIVIDE   = FN_COMBINE_DIVIDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_ADD); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ADD, __pyx_t_5) < 0) __PYX_ERR(11, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":25
 *     """
 *     ADD      = FN_COMBINE_ADD
 *     MULTIPLY = FN_COMBINE_MULTIPLY             # <<<<<<<<<<<<<<
 *     DIVIDE   = FN_COMBINE_DIVIDE
 *     COMPOSE  = FN_COMBINE_COMPOSE
 */
  __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_MULTIPLY); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLY, __pyx_t_5) < 0) __PYX_ERR(11, 25, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":26
 *     ADD      = FN_COMBINE_ADD
 *     MULTIPLY = FN_COMBINE_MULTIPLY
 *     DIVIDE   = FN_COMBINE_DIVIDE             # <<<<<<<<<<<<<<
 *     COMPOSE  = FN_COMBINE_COMPOSE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_DIVIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVIDE, __pyx_t_5) < 0) __PYX_ERR(11, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":27
 *     MULTIPLY = FN_COMBINE_MULTIPLY
 *     DIVIDE   = FN_COMBINE_DIVIDE
 *     COMPOSE  = FN_COMBINE_COMPOSE             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_FNCombineType(FN_COMBINE_COMPOSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_COMPOSE, __pyx_t_5) < 0) __PYX_ERR(11, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/FN.pyx":15
 *     INVSQRT  = S_(FNINVSQRT)
 * 
 * class FNCombineType(object):             # <<<<<<<<<<<<<<
 *     """
 *     FN type of combination of child functions
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_FNCombineType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FNCombineType, __pyx_t_5) < 0) __PYX_ERR(11, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/FN.pyx":37
 *     """
 * 
 *     Type        = FNType             # <<<<<<<<<<<<<<
 *     CombineType = FNCombineType
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FNType); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(11, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN);

  /* "SLEPc/FN.pyx":38
 * 
 *     Type        = FNType
 *     CombineType = FNCombineType             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FNCombineType); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_FN->tp_dict, __pyx_n_s_CombineType, __pyx_t_2) < 0) __PYX_ERR(11, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_FN);

  /* "SLEPc/FN.pyx":256
 * # -----------------------------------------------------------------------------
 * 
 * del FNType             # <<<<<<<<<<<<<<
 * del FNCombineType
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNType) < 0) __PYX_ERR(11, 256, __pyx_L1_error)

  /* "SLEPc/FN.pyx":257
 * 
 * del FNType
 * del FNCombineType             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_FNCombineType) < 0) __PYX_ERR(11, 257, __pyx_L1_error)

  /* "SLEPc/RG.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class RGType(object):             # <<<<<<<<<<<<<<
 *     """
 *     RG type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_RGType, __pyx_n_s_RGType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_RG_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/RG.pyx":7
 *     RG type
 *     """
 *     INTERVAL   = S_(RGINTERVAL)             # <<<<<<<<<<<<<<
 *     POLYGON    = S_(RGPOLYGON)
 *     ELLIPSE    = S_(RGELLIPSE)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGINTERVAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERVAL, __pyx_t_5) < 0) __PYX_ERR(12, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/RG.pyx":8
 *     """
 *     INTERVAL   = S_(RGINTERVAL)
 *     POLYGON    = S_(RGPOLYGON)             # <<<<<<<<<<<<<<
 *     ELLIPSE    = S_(RGELLIPSE)
 *     RING       = S_(RGRING)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGPOLYGON); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_POLYGON, __pyx_t_5) < 0) __PYX_ERR(12, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/RG.pyx":9
 *     INTERVAL   = S_(RGINTERVAL)
 *     POLYGON    = S_(RGPOLYGON)
 *     ELLIPSE    = S_(RGELLIPSE)             # <<<<<<<<<<<<<<
 *     RING       = S_(RGRING)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGELLIPSE); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ELLIPSE, __pyx_t_5) < 0) __PYX_ERR(12, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/RG.pyx":10
 *     POLYGON    = S_(RGPOLYGON)
 *     ELLIPSE    = S_(RGELLIPSE)
 *     RING       = S_(RGRING)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(RGRING); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RING, __pyx_t_5) < 0) __PYX_ERR(12, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/RG.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class RGType(object):             # <<<<<<<<<<<<<<
 *     """
 *     RG type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_RGType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RGType, __pyx_t_5) < 0) __PYX_ERR(12, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/RG.pyx":20
 *     """
 * 
 *     Type             = RGType             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RGType); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_RG->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(12, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_RG);

  /* "SLEPc/RG.pyx":263
 * # -----------------------------------------------------------------------------
 * 
 * del RGType             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_RGType) < 0) __PYX_ERR(12, 263, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class EPSType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSType, __pyx_n_s_EPSType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_type_Native_sparse_eigensol); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":32
 *     """
 *     # provided implementations
 *     POWER        = S_(EPSPOWER)             # <<<<<<<<<<<<<<
 *     SUBSPACE     = S_(EPSSUBSPACE)
 *     ARNOLDI      = S_(EPSARNOLDI)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPOWER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_POWER, __pyx_t_5) < 0) __PYX_ERR(13, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":33
 *     # provided implementations
 *     POWER        = S_(EPSPOWER)
 *     SUBSPACE     = S_(EPSSUBSPACE)             # <<<<<<<<<<<<<<
 *     ARNOLDI      = S_(EPSARNOLDI)
 *     LANCZOS      = S_(EPSLANCZOS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSSUBSPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SUBSPACE, __pyx_t_5) < 0) __PYX_ERR(13, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":34
 *     POWER        = S_(EPSPOWER)
 *     SUBSPACE     = S_(EPSSUBSPACE)
 *     ARNOLDI      = S_(EPSARNOLDI)             # <<<<<<<<<<<<<<
 *     LANCZOS      = S_(EPSLANCZOS)
 *     KRYLOVSCHUR  = S_(EPSKRYLOVSCHUR)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ARNOLDI, __pyx_t_5) < 0) __PYX_ERR(13, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":35
 *     SUBSPACE     = S_(EPSSUBSPACE)
 *     ARNOLDI      = S_(EPSARNOLDI)
 *     LANCZOS      = S_(EPSLANCZOS)             # <<<<<<<<<<<<<<
 *     KRYLOVSCHUR  = S_(EPSKRYLOVSCHUR)
 *     GD           = S_(EPSGD)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LANCZOS, __pyx_t_5) < 0) __PYX_ERR(13, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":36
 *     ARNOLDI      = S_(EPSARNOLDI)
 *     LANCZOS      = S_(EPSLANCZOS)
 *     KRYLOVSCHUR  = S_(EPSKRYLOVSCHUR)             # <<<<<<<<<<<<<<
 *     GD           = S_(EPSGD)
 *     JD           = S_(EPSJD)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSKRYLOVSCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_KRYLOVSCHUR, __pyx_t_5) < 0) __PYX_ERR(13, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":37
 *     LANCZOS      = S_(EPSLANCZOS)
 *     KRYLOVSCHUR  = S_(EPSKRYLOVSCHUR)
 *     GD           = S_(EPSGD)             # <<<<<<<<<<<<<<
 *     JD           = S_(EPSJD)
 *     RQCG         = S_(EPSRQCG)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSGD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GD, __pyx_t_5) < 0) __PYX_ERR(13, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":38
 *     KRYLOVSCHUR  = S_(EPSKRYLOVSCHUR)
 *     GD           = S_(EPSGD)
 *     JD           = S_(EPSJD)             # <<<<<<<<<<<<<<
 *     RQCG         = S_(EPSRQCG)
 *     LOBPCG       = S_(EPSLOBPCG)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSJD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_JD, __pyx_t_5) < 0) __PYX_ERR(13, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":39
 *     GD           = S_(EPSGD)
 *     JD           = S_(EPSJD)
 *     RQCG         = S_(EPSRQCG)             # <<<<<<<<<<<<<<
 *     LOBPCG       = S_(EPSLOBPCG)
 *     CISS         = S_(EPSCISS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSRQCG); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RQCG, __pyx_t_5) < 0) __PYX_ERR(13, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":40
 *     JD           = S_(EPSJD)
 *     RQCG         = S_(EPSRQCG)
 *     LOBPCG       = S_(EPSLOBPCG)             # <<<<<<<<<<<<<<
 *     CISS         = S_(EPSCISS)
 *     LAPACK       = S_(EPSLAPACK)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLOBPCG); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOBPCG, __pyx_t_5) < 0) __PYX_ERR(13, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":41
 *     RQCG         = S_(EPSRQCG)
 *     LOBPCG       = S_(EPSLOBPCG)
 *     CISS         = S_(EPSCISS)             # <<<<<<<<<<<<<<
 *     LAPACK       = S_(EPSLAPACK)
 *     # with external libraries
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSCISS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CISS, __pyx_t_5) < 0) __PYX_ERR(13, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":42
 *     LOBPCG       = S_(EPSLOBPCG)
 *     CISS         = S_(EPSCISS)
 *     LAPACK       = S_(EPSLAPACK)             # <<<<<<<<<<<<<<
 *     # with external libraries
 *     ARPACK       = S_(EPSARPACK)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSLAPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAPACK, __pyx_t_5) < 0) __PYX_ERR(13, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":44
 *     LAPACK       = S_(EPSLAPACK)
 *     # with external libraries
 *     ARPACK       = S_(EPSARPACK)             # <<<<<<<<<<<<<<
 *     BLZPACK      = S_(EPSBLZPACK)
 *     TRLAN        = S_(EPSTRLAN)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSARPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ARPACK, __pyx_t_5) < 0) __PYX_ERR(13, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":45
 *     # with external libraries
 *     ARPACK       = S_(EPSARPACK)
 *     BLZPACK      = S_(EPSBLZPACK)             # <<<<<<<<<<<<<<
 *     TRLAN        = S_(EPSTRLAN)
 *     BLOPEX       = S_(EPSBLOPEX)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLZPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BLZPACK, __pyx_t_5) < 0) __PYX_ERR(13, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":46
 *     ARPACK       = S_(EPSARPACK)
 *     BLZPACK      = S_(EPSBLZPACK)
 *     TRLAN        = S_(EPSTRLAN)             # <<<<<<<<<<<<<<
 *     BLOPEX       = S_(EPSBLOPEX)
 *     PRIMME       = S_(EPSPRIMME)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSTRLAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRLAN, __pyx_t_5) < 0) __PYX_ERR(13, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":47
 *     BLZPACK      = S_(EPSBLZPACK)
 *     TRLAN        = S_(EPSTRLAN)
 *     BLOPEX       = S_(EPSBLOPEX)             # <<<<<<<<<<<<<<
 *     PRIMME       = S_(EPSPRIMME)
 *     FEAST        = S_(EPSFEAST)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSBLOPEX); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BLOPEX, __pyx_t_5) < 0) __PYX_ERR(13, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":48
 *     TRLAN        = S_(EPSTRLAN)
 *     BLOPEX       = S_(EPSBLOPEX)
 *     PRIMME       = S_(EPSPRIMME)             # <<<<<<<<<<<<<<
 *     FEAST        = S_(EPSFEAST)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSPRIMME); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRIMME, __pyx_t_5) < 0) __PYX_ERR(13, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":49
 *     BLOPEX       = S_(EPSBLOPEX)
 *     PRIMME       = S_(EPSPRIMME)
 *     FEAST        = S_(EPSFEAST)             # <<<<<<<<<<<<<<
 * 
 * class EPSProblemType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(EPSFEAST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_FEAST, __pyx_t_5) < 0) __PYX_ERR(13, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class EPSType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSType, __pyx_t_5) < 0) __PYX_ERR(13, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":51
 *     FEAST        = S_(EPSFEAST)
 * 
 * class EPSProblemType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS problem type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSProblemType, __pyx_n_s_EPSProblemType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_problem_type_HEP_Hermitian); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":63
 *     - `GHIEP`:  Generalized Hermitian-indefinite eigenproblem.
 *     """
 *     HEP    = EPS_HEP             # <<<<<<<<<<<<<<
 *     NHEP   = EPS_NHEP
 *     GHEP   = EPS_GHEP
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_HEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HEP, __pyx_t_5) < 0) __PYX_ERR(13, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":64
 *     """
 *     HEP    = EPS_HEP
 *     NHEP   = EPS_NHEP             # <<<<<<<<<<<<<<
 *     GHEP   = EPS_GHEP
 *     GNHEP  = EPS_GNHEP
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_NHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NHEP, __pyx_t_5) < 0) __PYX_ERR(13, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":65
 *     HEP    = EPS_HEP
 *     NHEP   = EPS_NHEP
 *     GHEP   = EPS_GHEP             # <<<<<<<<<<<<<<
 *     GNHEP  = EPS_GNHEP
 *     PGNHEP = EPS_PGNHEP
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHEP, __pyx_t_5) < 0) __PYX_ERR(13, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":66
 *     NHEP   = EPS_NHEP
 *     GHEP   = EPS_GHEP
 *     GNHEP  = EPS_GNHEP             # <<<<<<<<<<<<<<
 *     PGNHEP = EPS_PGNHEP
 *     GHIEP  = EPS_GHIEP
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GNHEP, __pyx_t_5) < 0) __PYX_ERR(13, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":67
 *     GHEP   = EPS_GHEP
 *     GNHEP  = EPS_GNHEP
 *     PGNHEP = EPS_PGNHEP             # <<<<<<<<<<<<<<
 *     GHIEP  = EPS_GHIEP
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_PGNHEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PGNHEP, __pyx_t_5) < 0) __PYX_ERR(13, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":68
 *     GNHEP  = EPS_GNHEP
 *     PGNHEP = EPS_PGNHEP
 *     GHIEP  = EPS_GHIEP             # <<<<<<<<<<<<<<
 * 
 * class EPSExtraction(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSProblemType(EPS_GHIEP); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GHIEP, __pyx_t_5) < 0) __PYX_ERR(13, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":51
 *     FEAST        = S_(EPSFEAST)
 * 
 * class EPSProblemType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS problem type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSProblemType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSProblemType, __pyx_t_5) < 0) __PYX_ERR(13, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":70
 *     GHIEP  = EPS_GHIEP
 * 
 * class EPSExtraction(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS extraction technique
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSExtraction, __pyx_n_s_EPSExtraction, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_extraction_technique_RITZ_S); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":82
 *     - `REFINED_HARMONIC`:  Refined harmonic extraction.
 *     """
 *     RITZ              = EPS_RITZ             # <<<<<<<<<<<<<<
 *     HARMONIC          = EPS_HARMONIC
 *     HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_RITZ); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RITZ, __pyx_t_5) < 0) __PYX_ERR(13, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":83
 *     """
 *     RITZ              = EPS_RITZ
 *     HARMONIC          = EPS_HARMONIC             # <<<<<<<<<<<<<<
 *     HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE
 *     HARMONIC_RIGHT    = EPS_HARMONIC_RIGHT
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC, __pyx_t_5) < 0) __PYX_ERR(13, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":84
 *     RITZ              = EPS_RITZ
 *     HARMONIC          = EPS_HARMONIC
 *     HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE             # <<<<<<<<<<<<<<
 *     HARMONIC_RIGHT    = EPS_HARMONIC_RIGHT
 *     HARMONIC_LARGEST  = EPS_HARMONIC_LARGEST
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(13, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":85
 *     HARMONIC          = EPS_HARMONIC
 *     HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE
 *     HARMONIC_RIGHT    = EPS_HARMONIC_RIGHT             # <<<<<<<<<<<<<<
 *     HARMONIC_LARGEST  = EPS_HARMONIC_LARGEST
 *     REFINED           = EPS_REFINED
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_RIGHT); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_RIGHT, __pyx_t_5) < 0) __PYX_ERR(13, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":86
 *     HARMONIC_RELATIVE = EPS_HARMONIC_RELATIVE
 *     HARMONIC_RIGHT    = EPS_HARMONIC_RIGHT
 *     HARMONIC_LARGEST  = EPS_HARMONIC_LARGEST             # <<<<<<<<<<<<<<
 *     REFINED           = EPS_REFINED
 *     REFINED_HARMONIC  = EPS_REFINED_HARMONIC
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_HARMONIC_LARGEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HARMONIC_LARGEST, __pyx_t_5) < 0) __PYX_ERR(13, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":87
 *     HARMONIC_RIGHT    = EPS_HARMONIC_RIGHT
 *     HARMONIC_LARGEST  = EPS_HARMONIC_LARGEST
 *     REFINED           = EPS_REFINED             # <<<<<<<<<<<<<<
 *     REFINED_HARMONIC  = EPS_REFINED_HARMONIC
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REFINED, __pyx_t_5) < 0) __PYX_ERR(13, 87, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":88
 *     HARMONIC_LARGEST  = EPS_HARMONIC_LARGEST
 *     REFINED           = EPS_REFINED
 *     REFINED_HARMONIC  = EPS_REFINED_HARMONIC             # <<<<<<<<<<<<<<
 * 
 * class EPSBalance(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSExtraction(EPS_REFINED_HARMONIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REFINED_HARMONIC, __pyx_t_5) < 0) __PYX_ERR(13, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":70
 *     GHIEP  = EPS_GHIEP
 * 
 * class EPSExtraction(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS extraction technique
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSExtraction, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSExtraction, __pyx_t_5) < 0) __PYX_ERR(13, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":90
 *     REFINED_HARMONIC  = EPS_REFINED_HARMONIC
 * 
 * class EPSBalance(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS type of balancing used for non-Hermitian problems
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSBalance, __pyx_n_s_EPSBalance, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_type_of_balancing_used_for); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":99
 *     - `USER`:     User-defined.
 *     """
 *     NONE    = EPS_BALANCE_NONE             # <<<<<<<<<<<<<<
 *     ONESIDE = EPS_BALANCE_ONESIDE
 *     TWOSIDE = EPS_BALANCE_TWOSIDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(13, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":100
 *     """
 *     NONE    = EPS_BALANCE_NONE
 *     ONESIDE = EPS_BALANCE_ONESIDE             # <<<<<<<<<<<<<<
 *     TWOSIDE = EPS_BALANCE_TWOSIDE
 *     USER    = EPS_BALANCE_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_ONESIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 100, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ONESIDE, __pyx_t_5) < 0) __PYX_ERR(13, 100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":101
 *     NONE    = EPS_BALANCE_NONE
 *     ONESIDE = EPS_BALANCE_ONESIDE
 *     TWOSIDE = EPS_BALANCE_TWOSIDE             # <<<<<<<<<<<<<<
 *     USER    = EPS_BALANCE_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_TWOSIDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TWOSIDE, __pyx_t_5) < 0) __PYX_ERR(13, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":102
 *     ONESIDE = EPS_BALANCE_ONESIDE
 *     TWOSIDE = EPS_BALANCE_TWOSIDE
 *     USER    = EPS_BALANCE_USER             # <<<<<<<<<<<<<<
 * 
 * class EPSErrorType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSBalance(EPS_BALANCE_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":90
 *     REFINED_HARMONIC  = EPS_REFINED_HARMONIC
 * 
 * class EPSBalance(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS type of balancing used for non-Hermitian problems
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSBalance, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSBalance, __pyx_t_5) < 0) __PYX_ERR(13, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":104
 *     USER    = EPS_BALANCE_USER
 * 
 * class EPSErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS error type to assess accuracy of computed solutions
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSErrorType, __pyx_n_s_EPSErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":112
 *     - `BACKWARD`:  Backward error.
 *     """
 *     ABSOLUTE = EPS_ERROR_ABSOLUTE             # <<<<<<<<<<<<<<
 *     RELATIVE = EPS_ERROR_RELATIVE
 *     BACKWARD = EPS_ERROR_BACKWARD
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(13, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":113
 *     """
 *     ABSOLUTE = EPS_ERROR_ABSOLUTE
 *     RELATIVE = EPS_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *     BACKWARD = EPS_ERROR_BACKWARD
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(13, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":114
 *     ABSOLUTE = EPS_ERROR_ABSOLUTE
 *     RELATIVE = EPS_ERROR_RELATIVE
 *     BACKWARD = EPS_ERROR_BACKWARD             # <<<<<<<<<<<<<<
 * 
 * class EPSWhich(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSErrorType(EPS_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(13, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":104
 *     USER    = EPS_BALANCE_USER
 * 
 * class EPSErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS error type to assess accuracy of computed solutions
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSErrorType, __pyx_t_5) < 0) __PYX_ERR(13, 104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":116
 *     BACKWARD = EPS_ERROR_BACKWARD
 * 
 * class EPSWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS desired piece of spectrum
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSWhich, __pyx_n_s_EPSWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_desired_piece_of_spectrum_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":132
 *     - `USER`:               User defined ordering.
 *     """
 *     LARGEST_MAGNITUDE  = EPS_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     LARGEST_REAL       = EPS_LARGEST_REAL
 *     LARGEST_IMAGINARY  = EPS_LARGEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":133
 *     """
 *     LARGEST_MAGNITUDE  = EPS_LARGEST_MAGNITUDE
 *     LARGEST_REAL       = EPS_LARGEST_REAL             # <<<<<<<<<<<<<<
 *     LARGEST_IMAGINARY  = EPS_LARGEST_IMAGINARY
 *     SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":134
 *     LARGEST_MAGNITUDE  = EPS_LARGEST_MAGNITUDE
 *     LARGEST_REAL       = EPS_LARGEST_REAL
 *     LARGEST_IMAGINARY  = EPS_LARGEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE
 *     SMALLEST_REAL      = EPS_SMALLEST_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":135
 *     LARGEST_REAL       = EPS_LARGEST_REAL
 *     LARGEST_IMAGINARY  = EPS_LARGEST_IMAGINARY
 *     SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     SMALLEST_REAL      = EPS_SMALLEST_REAL
 *     SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":136
 *     LARGEST_IMAGINARY  = EPS_LARGEST_IMAGINARY
 *     SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE
 *     SMALLEST_REAL      = EPS_SMALLEST_REAL             # <<<<<<<<<<<<<<
 *     SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = EPS_TARGET_MAGNITUDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":137
 *     SMALLEST_MAGNITUDE = EPS_SMALLEST_MAGNITUDE
 *     SMALLEST_REAL      = EPS_SMALLEST_REAL
 *     SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     TARGET_MAGNITUDE   = EPS_TARGET_MAGNITUDE
 *     TARGET_REAL        = EPS_TARGET_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":138
 *     SMALLEST_REAL      = EPS_SMALLEST_REAL
 *     SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = EPS_TARGET_MAGNITUDE             # <<<<<<<<<<<<<<
 *     TARGET_REAL        = EPS_TARGET_REAL
 *     TARGET_IMAGINARY   = EPS_TARGET_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(13, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":139
 *     SMALLEST_IMAGINARY = EPS_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = EPS_TARGET_MAGNITUDE
 *     TARGET_REAL        = EPS_TARGET_REAL             # <<<<<<<<<<<<<<
 *     TARGET_IMAGINARY   = EPS_TARGET_IMAGINARY
 *     ALL                = EPS_ALL
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(13, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":140
 *     TARGET_MAGNITUDE   = EPS_TARGET_MAGNITUDE
 *     TARGET_REAL        = EPS_TARGET_REAL
 *     TARGET_IMAGINARY   = EPS_TARGET_IMAGINARY             # <<<<<<<<<<<<<<
 *     ALL                = EPS_ALL
 *     USER               = EPS_WHICH_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(13, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":141
 *     TARGET_REAL        = EPS_TARGET_REAL
 *     TARGET_IMAGINARY   = EPS_TARGET_IMAGINARY
 *     ALL                = EPS_ALL             # <<<<<<<<<<<<<<
 *     USER               = EPS_WHICH_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_ALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALL, __pyx_t_5) < 0) __PYX_ERR(13, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":142
 *     TARGET_IMAGINARY   = EPS_TARGET_IMAGINARY
 *     ALL                = EPS_ALL
 *     USER               = EPS_WHICH_USER             # <<<<<<<<<<<<<<
 * 
 * class EPSConv(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSWhich(EPS_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":116
 *     BACKWARD = EPS_ERROR_BACKWARD
 * 
 * class EPSWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS desired piece of spectrum
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSWhich, __pyx_t_5) < 0) __PYX_ERR(13, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":144
 *     USER               = EPS_WHICH_USER
 * 
 * class EPSConv(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS convergence test
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSConv, __pyx_n_s_EPSConv, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_convergence_test_ABS_REL_NO); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":153
 *     - `USER`:
 *     """
 *     ABS  = EPS_CONV_ABS             # <<<<<<<<<<<<<<
 *     REL  = EPS_CONV_REL
 *     NORM = EPS_CONV_NORM
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_ABS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABS, __pyx_t_5) < 0) __PYX_ERR(13, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":154
 *     """
 *     ABS  = EPS_CONV_ABS
 *     REL  = EPS_CONV_REL             # <<<<<<<<<<<<<<
 *     NORM = EPS_CONV_NORM
 *     USER = EPS_CONV_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_REL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REL, __pyx_t_5) < 0) __PYX_ERR(13, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":155
 *     ABS  = EPS_CONV_ABS
 *     REL  = EPS_CONV_REL
 *     NORM = EPS_CONV_NORM             # <<<<<<<<<<<<<<
 *     USER = EPS_CONV_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(13, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":156
 *     REL  = EPS_CONV_REL
 *     NORM = EPS_CONV_NORM
 *     USER = EPS_CONV_USER             # <<<<<<<<<<<<<<
 * 
 * class EPSConvergedReason(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConv(EPS_CONV_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(13, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":144
 *     USER               = EPS_WHICH_USER
 * 
 * class EPSConv(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS convergence test
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSConv, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConv, __pyx_t_5) < 0) __PYX_ERR(13, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":158
 *     USER = EPS_CONV_USER
 * 
 * class EPSConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS convergence reasons
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSConvergedReason, __pyx_n_s_EPSConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":169
 *     - `CONVERGED_ITERATING`:
 *     """
 *     CONVERGED_TOL          = EPS_CONVERGED_TOL             # <<<<<<<<<<<<<<
 *     CONVERGED_USER         = EPS_CONVERGED_USER
 *     DIVERGED_ITS           = EPS_DIVERGED_ITS
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(13, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":170
 *     """
 *     CONVERGED_TOL          = EPS_CONVERGED_TOL
 *     CONVERGED_USER         = EPS_CONVERGED_USER             # <<<<<<<<<<<<<<
 *     DIVERGED_ITS           = EPS_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = EPS_DIVERGED_BREAKDOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(13, 170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":171
 *     CONVERGED_TOL          = EPS_CONVERGED_TOL
 *     CONVERGED_USER         = EPS_CONVERGED_USER
 *     DIVERGED_ITS           = EPS_DIVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_BREAKDOWN     = EPS_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(13, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":172
 *     CONVERGED_USER         = EPS_CONVERGED_USER
 *     DIVERGED_ITS           = EPS_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = EPS_DIVERGED_BREAKDOWN             # <<<<<<<<<<<<<<
 *     DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = EPS_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(13, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":173
 *     DIVERGED_ITS           = EPS_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = EPS_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST             # <<<<<<<<<<<<<<
 *     CONVERGED_ITERATING    = EPS_CONVERGED_ITERATING
 *     ITERATING              = EPS_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_5) < 0) __PYX_ERR(13, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":174
 *     DIVERGED_BREAKDOWN     = EPS_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = EPS_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *     ITERATING              = EPS_CONVERGED_ITERATING
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(13, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":175
 *     DIVERGED_SYMMETRY_LOST = EPS_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = EPS_CONVERGED_ITERATING
 *     ITERATING              = EPS_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 * 
 * class EPSPowerShiftType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSConvergedReason(EPS_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(13, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":158
 *     USER = EPS_CONV_USER
 * 
 * class EPSConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS convergence reasons
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSConvergedReason, __pyx_t_5) < 0) __PYX_ERR(13, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":177
 *     ITERATING              = EPS_CONVERGED_ITERATING
 * 
 * class EPSPowerShiftType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS Power shift type.
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSPowerShiftType, __pyx_n_s_EPSPowerShiftType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_Power_shift_type_CONSTANT_R); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":185
 *     - `WILKINSON`:
 *     """
 *     CONSTANT  = EPS_POWER_SHIFT_CONSTANT             # <<<<<<<<<<<<<<
 *     RAYLEIGH  = EPS_POWER_SHIFT_RAYLEIGH
 *     WILKINSON = EPS_POWER_SHIFT_WILKINSON
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_CONSTANT); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONSTANT, __pyx_t_5) < 0) __PYX_ERR(13, 185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":186
 *     """
 *     CONSTANT  = EPS_POWER_SHIFT_CONSTANT
 *     RAYLEIGH  = EPS_POWER_SHIFT_RAYLEIGH             # <<<<<<<<<<<<<<
 *     WILKINSON = EPS_POWER_SHIFT_WILKINSON
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_RAYLEIGH); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RAYLEIGH, __pyx_t_5) < 0) __PYX_ERR(13, 186, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":187
 *     CONSTANT  = EPS_POWER_SHIFT_CONSTANT
 *     RAYLEIGH  = EPS_POWER_SHIFT_RAYLEIGH
 *     WILKINSON = EPS_POWER_SHIFT_WILKINSON             # <<<<<<<<<<<<<<
 * 
 * class EPSLanczosReorthogType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSPowerShiftType(EPS_POWER_SHIFT_WILKINSON); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_WILKINSON, __pyx_t_5) < 0) __PYX_ERR(13, 187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":177
 *     ITERATING              = EPS_CONVERGED_ITERATING
 * 
 * class EPSPowerShiftType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS Power shift type.
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSPowerShiftType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSPowerShiftType, __pyx_t_5) < 0) __PYX_ERR(13, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":189
 *     WILKINSON = EPS_POWER_SHIFT_WILKINSON
 * 
 * class EPSLanczosReorthogType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS Lanczos reorthogonalization type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_EPSLanczosReorthogType, __pyx_n_s_EPSLanczosReorthogType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_EPS_Lanczos_reorthogonalization); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/EPS.pyx":200
 *     - `DELAYED`:
 *     """
 *     LOCAL     =  EPS_LANCZOS_REORTHOG_LOCAL             # <<<<<<<<<<<<<<
 *     FULL      =  EPS_LANCZOS_REORTHOG_FULL
 *     SELECTIVE =  EPS_LANCZOS_REORTHOG_SELECTIVE
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_LOCAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LOCAL, __pyx_t_5) < 0) __PYX_ERR(13, 200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":201
 *     """
 *     LOCAL     =  EPS_LANCZOS_REORTHOG_LOCAL
 *     FULL      =  EPS_LANCZOS_REORTHOG_FULL             # <<<<<<<<<<<<<<
 *     SELECTIVE =  EPS_LANCZOS_REORTHOG_SELECTIVE
 *     PERIODIC  =  EPS_LANCZOS_REORTHOG_PERIODIC
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_FULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_FULL, __pyx_t_5) < 0) __PYX_ERR(13, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":202
 *     LOCAL     =  EPS_LANCZOS_REORTHOG_LOCAL
 *     FULL      =  EPS_LANCZOS_REORTHOG_FULL
 *     SELECTIVE =  EPS_LANCZOS_REORTHOG_SELECTIVE             # <<<<<<<<<<<<<<
 *     PERIODIC  =  EPS_LANCZOS_REORTHOG_PERIODIC
 *     PARTIAL   =  EPS_LANCZOS_REORTHOG_PARTIAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_SELECTIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SELECTIVE, __pyx_t_5) < 0) __PYX_ERR(13, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":203
 *     FULL      =  EPS_LANCZOS_REORTHOG_FULL
 *     SELECTIVE =  EPS_LANCZOS_REORTHOG_SELECTIVE
 *     PERIODIC  =  EPS_LANCZOS_REORTHOG_PERIODIC             # <<<<<<<<<<<<<<
 *     PARTIAL   =  EPS_LANCZOS_REORTHOG_PARTIAL
 *     DELAYED   =  EPS_LANCZOS_REORTHOG_DELAYED
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PERIODIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PERIODIC, __pyx_t_5) < 0) __PYX_ERR(13, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":204
 *     SELECTIVE =  EPS_LANCZOS_REORTHOG_SELECTIVE
 *     PERIODIC  =  EPS_LANCZOS_REORTHOG_PERIODIC
 *     PARTIAL   =  EPS_LANCZOS_REORTHOG_PARTIAL             # <<<<<<<<<<<<<<
 *     DELAYED   =  EPS_LANCZOS_REORTHOG_DELAYED
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_PARTIAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PARTIAL, __pyx_t_5) < 0) __PYX_ERR(13, 204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":205
 *     PERIODIC  =  EPS_LANCZOS_REORTHOG_PERIODIC
 *     PARTIAL   =  EPS_LANCZOS_REORTHOG_PARTIAL
 *     DELAYED   =  EPS_LANCZOS_REORTHOG_DELAYED             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_EPSLanczosReorthogType(EPS_LANCZOS_REORTHOG_DELAYED); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DELAYED, __pyx_t_5) < 0) __PYX_ERR(13, 205, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/EPS.pyx":189
 *     WILKINSON = EPS_POWER_SHIFT_WILKINSON
 * 
 * class EPSLanczosReorthogType(object):             # <<<<<<<<<<<<<<
 *     """
 *     EPS Lanczos reorthogonalization type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_EPSLanczosReorthogType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(13, 189, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_EPSLanczosReorthogType, __pyx_t_5) < 0) __PYX_ERR(13, 189, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/EPS.pyx":215
 *     """
 * 
 *     Type            = EPSType             # <<<<<<<<<<<<<<
 *     ProblemType     = EPSProblemType
 *     Extraction      = EPSExtraction
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(13, 215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":216
 * 
 *     Type            = EPSType
 *     ProblemType     = EPSProblemType             # <<<<<<<<<<<<<<
 *     Extraction      = EPSExtraction
 *     Balance         = EPSBalance
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ProblemType, __pyx_t_2) < 0) __PYX_ERR(13, 216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":217
 *     Type            = EPSType
 *     ProblemType     = EPSProblemType
 *     Extraction      = EPSExtraction             # <<<<<<<<<<<<<<
 *     Balance         = EPSBalance
 *     ErrorType       = EPSErrorType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSExtraction); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Extraction, __pyx_t_2) < 0) __PYX_ERR(13, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":218
 *     ProblemType     = EPSProblemType
 *     Extraction      = EPSExtraction
 *     Balance         = EPSBalance             # <<<<<<<<<<<<<<
 *     ErrorType       = EPSErrorType
 *     Which           = EPSWhich
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSBalance); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Balance, __pyx_t_2) < 0) __PYX_ERR(13, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":219
 *     Extraction      = EPSExtraction
 *     Balance         = EPSBalance
 *     ErrorType       = EPSErrorType             # <<<<<<<<<<<<<<
 *     Which           = EPSWhich
 *     Conv            = EPSConv
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(13, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":220
 *     Balance         = EPSBalance
 *     ErrorType       = EPSErrorType
 *     Which           = EPSWhich             # <<<<<<<<<<<<<<
 *     Conv            = EPSConv
 *     ConvergedReason = EPSConvergedReason
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(13, 220, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":221
 *     ErrorType       = EPSErrorType
 *     Which           = EPSWhich
 *     Conv            = EPSConv             # <<<<<<<<<<<<<<
 *     ConvergedReason = EPSConvergedReason
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSConv); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_Conv, __pyx_t_2) < 0) __PYX_ERR(13, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":222
 *     Which           = EPSWhich
 *     Conv            = EPSConv
 *     ConvergedReason = EPSConvergedReason             # <<<<<<<<<<<<<<
 * 
 *     PowerShiftType      = EPSPowerShiftType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(13, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":224
 *     ConvergedReason = EPSConvergedReason
 * 
 *     PowerShiftType      = EPSPowerShiftType             # <<<<<<<<<<<<<<
 *     LanczosReorthogType = EPSLanczosReorthogType
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSPowerShiftType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_PowerShiftType, __pyx_t_2) < 0) __PYX_ERR(13, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":225
 * 
 *     PowerShiftType      = EPSPowerShiftType
 *     LanczosReorthogType = EPSLanczosReorthogType             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EPSLanczosReorthogType); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_EPS->tp_dict, __pyx_n_s_LanczosReorthogType, __pyx_t_2) < 0) __PYX_ERR(13, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_EPS);

  /* "SLEPc/EPS.pyx":1860
 * # -----------------------------------------------------------------------------
 * 
 * del EPSType             # <<<<<<<<<<<<<<
 * del EPSProblemType
 * del EPSExtraction
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSType) < 0) __PYX_ERR(13, 1860, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1861
 * 
 * del EPSType
 * del EPSProblemType             # <<<<<<<<<<<<<<
 * del EPSExtraction
 * del EPSBalance
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSProblemType) < 0) __PYX_ERR(13, 1861, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1862
 * del EPSType
 * del EPSProblemType
 * del EPSExtraction             # <<<<<<<<<<<<<<
 * del EPSBalance
 * del EPSErrorType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSExtraction) < 0) __PYX_ERR(13, 1862, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1863
 * del EPSProblemType
 * del EPSExtraction
 * del EPSBalance             # <<<<<<<<<<<<<<
 * del EPSErrorType
 * del EPSWhich
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSBalance) < 0) __PYX_ERR(13, 1863, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1864
 * del EPSExtraction
 * del EPSBalance
 * del EPSErrorType             # <<<<<<<<<<<<<<
 * del EPSWhich
 * del EPSConv
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSErrorType) < 0) __PYX_ERR(13, 1864, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1865
 * del EPSBalance
 * del EPSErrorType
 * del EPSWhich             # <<<<<<<<<<<<<<
 * del EPSConv
 * del EPSConvergedReason
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSWhich) < 0) __PYX_ERR(13, 1865, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1866
 * del EPSErrorType
 * del EPSWhich
 * del EPSConv             # <<<<<<<<<<<<<<
 * del EPSConvergedReason
 * del EPSPowerShiftType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConv) < 0) __PYX_ERR(13, 1866, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1867
 * del EPSWhich
 * del EPSConv
 * del EPSConvergedReason             # <<<<<<<<<<<<<<
 * del EPSPowerShiftType
 * del EPSLanczosReorthogType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSConvergedReason) < 0) __PYX_ERR(13, 1867, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1868
 * del EPSConv
 * del EPSConvergedReason
 * del EPSPowerShiftType             # <<<<<<<<<<<<<<
 * del EPSLanczosReorthogType
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSPowerShiftType) < 0) __PYX_ERR(13, 1868, __pyx_L1_error)

  /* "SLEPc/EPS.pyx":1869
 * del EPSConvergedReason
 * del EPSPowerShiftType
 * del EPSLanczosReorthogType             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_EPSLanczosReorthogType) < 0) __PYX_ERR(13, 1869, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class SVDType(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD types
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDType, __pyx_n_s_SVDType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_types_CROSS_Eigenproblem_wi); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/SVD.pyx":13
 *     - `TRLANCZOS`: Thick-restart Lanczos.
 *     """
 *     CROSS     = S_(SVDCROSS)             # <<<<<<<<<<<<<<
 *     CYCLIC    = S_(SVDCYCLIC)
 *     LAPACK    = S_(SVDLAPACK)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCROSS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CROSS, __pyx_t_5) < 0) __PYX_ERR(14, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":14
 *     """
 *     CROSS     = S_(SVDCROSS)
 *     CYCLIC    = S_(SVDCYCLIC)             # <<<<<<<<<<<<<<
 *     LAPACK    = S_(SVDLAPACK)
 *     LANCZOS   = S_(SVDLANCZOS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDCYCLIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CYCLIC, __pyx_t_5) < 0) __PYX_ERR(14, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":15
 *     CROSS     = S_(SVDCROSS)
 *     CYCLIC    = S_(SVDCYCLIC)
 *     LAPACK    = S_(SVDLAPACK)             # <<<<<<<<<<<<<<
 *     LANCZOS   = S_(SVDLANCZOS)
 *     TRLANCZOS = S_(SVDTRLANCZOS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLAPACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAPACK, __pyx_t_5) < 0) __PYX_ERR(14, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":16
 *     CYCLIC    = S_(SVDCYCLIC)
 *     LAPACK    = S_(SVDLAPACK)
 *     LANCZOS   = S_(SVDLANCZOS)             # <<<<<<<<<<<<<<
 *     TRLANCZOS = S_(SVDTRLANCZOS)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LANCZOS, __pyx_t_5) < 0) __PYX_ERR(14, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":17
 *     LAPACK    = S_(SVDLAPACK)
 *     LANCZOS   = S_(SVDLANCZOS)
 *     TRLANCZOS = S_(SVDTRLANCZOS)             # <<<<<<<<<<<<<<
 * 
 * class SVDErrorType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(SVDTRLANCZOS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TRLANCZOS, __pyx_t_5) < 0) __PYX_ERR(14, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class SVDType(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD types
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDType, __pyx_t_5) < 0) __PYX_ERR(14, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/SVD.pyx":19
 *     TRLANCZOS = S_(SVDTRLANCZOS)
 * 
 * class SVDErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD error type to assess accuracy of computed solutions
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDErrorType, __pyx_n_s_SVDErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/SVD.pyx":26
 *     - `RELATIVE`:  Relative error.
 *     """
 *     ABSOLUTE = SVD_ERROR_ABSOLUTE             # <<<<<<<<<<<<<<
 *     RELATIVE = SVD_ERROR_RELATIVE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(14, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":27
 *     """
 *     ABSOLUTE = SVD_ERROR_ABSOLUTE
 *     RELATIVE = SVD_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 * 
 * class SVDWhich(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDErrorType(SVD_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(14, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":19
 *     TRLANCZOS = S_(SVDTRLANCZOS)
 * 
 * class SVDErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD error type to assess accuracy of computed solutions
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDErrorType, __pyx_t_5) < 0) __PYX_ERR(14, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/SVD.pyx":29
 *     RELATIVE = SVD_ERROR_RELATIVE
 * 
 * class SVDWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD desired piece of spectrum
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDWhich, __pyx_n_s_SVDWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_desired_piece_of_spectrum_L); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/SVD.pyx":36
 *     - `SMALLEST`: smallest singular values.
 *     """
 *     LARGEST  = SVD_LARGEST             # <<<<<<<<<<<<<<
 *     SMALLEST = SVD_SMALLEST
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDWhich(SVD_LARGEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST, __pyx_t_5) < 0) __PYX_ERR(14, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":37
 *     """
 *     LARGEST  = SVD_LARGEST
 *     SMALLEST = SVD_SMALLEST             # <<<<<<<<<<<<<<
 * 
 * class SVDConvergedReason(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDWhich(SVD_SMALLEST); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST, __pyx_t_5) < 0) __PYX_ERR(14, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":29
 *     RELATIVE = SVD_ERROR_RELATIVE
 * 
 * class SVDWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD desired piece of spectrum
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDWhich, __pyx_t_5) < 0) __PYX_ERR(14, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/SVD.pyx":39
 *     SMALLEST = SVD_SMALLEST
 * 
 * class SVDConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD convergence reasons
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SVDConvergedReason, __pyx_n_s_SVDConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_SVD_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/SVD.pyx":49
 *     - `CONVERGED_ITERATING`:
 *     """
 *     CONVERGED_TOL       = SVD_CONVERGED_TOL             # <<<<<<<<<<<<<<
 *     CONVERGED_USER      = SVD_CONVERGED_USER
 *     DIVERGED_ITS        = SVD_DIVERGED_ITS
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(14, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":50
 *     """
 *     CONVERGED_TOL       = SVD_CONVERGED_TOL
 *     CONVERGED_USER      = SVD_CONVERGED_USER             # <<<<<<<<<<<<<<
 *     DIVERGED_ITS        = SVD_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = SVD_DIVERGED_BREAKDOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(14, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":51
 *     CONVERGED_TOL       = SVD_CONVERGED_TOL
 *     CONVERGED_USER      = SVD_CONVERGED_USER
 *     DIVERGED_ITS        = SVD_DIVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_BREAKDOWN  = SVD_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = SVD_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(14, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":52
 *     CONVERGED_USER      = SVD_CONVERGED_USER
 *     DIVERGED_ITS        = SVD_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = SVD_DIVERGED_BREAKDOWN             # <<<<<<<<<<<<<<
 *     CONVERGED_ITERATING = SVD_CONVERGED_ITERATING
 *     ITERATING           = SVD_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(14, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":53
 *     DIVERGED_ITS        = SVD_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = SVD_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = SVD_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *     ITERATING           = SVD_CONVERGED_ITERATING
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(14, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":54
 *     DIVERGED_BREAKDOWN  = SVD_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = SVD_CONVERGED_ITERATING
 *     ITERATING           = SVD_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_SVDConvergedReason(SVD_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(14, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/SVD.pyx":39
 *     SMALLEST = SVD_SMALLEST
 * 
 * class SVDConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     SVD convergence reasons
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SVDConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVDConvergedReason, __pyx_t_5) < 0) __PYX_ERR(14, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/SVD.pyx":64
 *     """
 * 
 *     Type            = SVDType             # <<<<<<<<<<<<<<
 *     ErrorType       = SVDErrorType
 *     Which           = SVDWhich
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDType); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(14, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD);

  /* "SLEPc/SVD.pyx":65
 * 
 *     Type            = SVDType
 *     ErrorType       = SVDErrorType             # <<<<<<<<<<<<<<
 *     Which           = SVDWhich
 *     ConvergedReason = SVDConvergedReason
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(14, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD);

  /* "SLEPc/SVD.pyx":66
 *     Type            = SVDType
 *     ErrorType       = SVDErrorType
 *     Which           = SVDWhich             # <<<<<<<<<<<<<<
 *     ConvergedReason = SVDConvergedReason
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(14, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD);

  /* "SLEPc/SVD.pyx":67
 *     ErrorType       = SVDErrorType
 *     Which           = SVDWhich
 *     ConvergedReason = SVDConvergedReason             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SVDConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_SVD->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(14, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_SVD);

  /* "SLEPc/SVD.pyx":846
 * # -----------------------------------------------------------------------------
 * 
 * del SVDType             # <<<<<<<<<<<<<<
 * del SVDErrorType
 * del SVDWhich
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDType) < 0) __PYX_ERR(14, 846, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":847
 * 
 * del SVDType
 * del SVDErrorType             # <<<<<<<<<<<<<<
 * del SVDWhich
 * del SVDConvergedReason
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDErrorType) < 0) __PYX_ERR(14, 847, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":848
 * del SVDType
 * del SVDErrorType
 * del SVDWhich             # <<<<<<<<<<<<<<
 * del SVDConvergedReason
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDWhich) < 0) __PYX_ERR(14, 848, __pyx_L1_error)

  /* "SLEPc/SVD.pyx":849
 * del SVDErrorType
 * del SVDWhich
 * del SVDConvergedReason             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_SVDConvergedReason) < 0) __PYX_ERR(14, 849, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class PEPType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPType, __pyx_n_s_PEPType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_type_Polynomial_eigensolver); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":15
 *     - `JD`:           Polynomial Jacobi-Davidson.
 *     """
 *     LINEAR   = S_(PEPLINEAR)             # <<<<<<<<<<<<<<
 *     QARNOLDI = S_(PEPQARNOLDI)
 *     TOAR     = S_(PEPTOAR)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPLINEAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LINEAR, __pyx_t_5) < 0) __PYX_ERR(15, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":16
 *     """
 *     LINEAR   = S_(PEPLINEAR)
 *     QARNOLDI = S_(PEPQARNOLDI)             # <<<<<<<<<<<<<<
 *     TOAR     = S_(PEPTOAR)
 *     STOAR    = S_(PEPSTOAR)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPQARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_QARNOLDI, __pyx_t_5) < 0) __PYX_ERR(15, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":17
 *     LINEAR   = S_(PEPLINEAR)
 *     QARNOLDI = S_(PEPQARNOLDI)
 *     TOAR     = S_(PEPTOAR)             # <<<<<<<<<<<<<<
 *     STOAR    = S_(PEPSTOAR)
 *     JD       = S_(PEPJD)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPTOAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TOAR, __pyx_t_5) < 0) __PYX_ERR(15, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":18
 *     QARNOLDI = S_(PEPQARNOLDI)
 *     TOAR     = S_(PEPTOAR)
 *     STOAR    = S_(PEPSTOAR)             # <<<<<<<<<<<<<<
 *     JD       = S_(PEPJD)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPSTOAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_STOAR, __pyx_t_5) < 0) __PYX_ERR(15, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":19
 *     TOAR     = S_(PEPTOAR)
 *     STOAR    = S_(PEPSTOAR)
 *     JD       = S_(PEPJD)             # <<<<<<<<<<<<<<
 * 
 * class PEPProblemType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(PEPJD); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_JD, __pyx_t_5) < 0) __PYX_ERR(15, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class PEPType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPType, __pyx_t_5) < 0) __PYX_ERR(15, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":21
 *     JD       = S_(PEPJD)
 * 
 * class PEPProblemType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP problem type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPProblemType, __pyx_n_s_PEPProblemType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_problem_type_GENERAL_No_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":29
 *     - `GYROSCOPIC`:   Hamiltonian structure.
 *     """
 *     GENERAL    = PEP_GENERAL             # <<<<<<<<<<<<<<
 *     HERMITIAN  = PEP_HERMITIAN
 *     GYROSCOPIC = PEP_GYROSCOPIC
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_GENERAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GENERAL, __pyx_t_5) < 0) __PYX_ERR(15, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":30
 *     """
 *     GENERAL    = PEP_GENERAL
 *     HERMITIAN  = PEP_HERMITIAN             # <<<<<<<<<<<<<<
 *     GYROSCOPIC = PEP_GYROSCOPIC
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_HERMITIAN); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HERMITIAN, __pyx_t_5) < 0) __PYX_ERR(15, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":31
 *     GENERAL    = PEP_GENERAL
 *     HERMITIAN  = PEP_HERMITIAN
 *     GYROSCOPIC = PEP_GYROSCOPIC             # <<<<<<<<<<<<<<
 * 
 * class PEPWhich(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPProblemType(PEP_GYROSCOPIC); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_GYROSCOPIC, __pyx_t_5) < 0) __PYX_ERR(15, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":21
 *     JD       = S_(PEPJD)
 * 
 * class PEPProblemType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP problem type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPProblemType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPProblemType, __pyx_t_5) < 0) __PYX_ERR(15, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":33
 *     GYROSCOPIC = PEP_GYROSCOPIC
 * 
 * class PEPWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP desired part of spectrum
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPWhich, __pyx_n_s_PEPWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_desired_part_of_spectrum_LA); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":48
 *     - `USER`:               User-defined criterion.
 *     """
 *     LARGEST_MAGNITUDE  = PEP_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = PEP_LARGEST_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":49
 *     """
 *     LARGEST_MAGNITUDE  = PEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     LARGEST_REAL       = PEP_LARGEST_REAL
 *     SMALLEST_REAL      = PEP_SMALLEST_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":50
 *     LARGEST_MAGNITUDE  = PEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = PEP_LARGEST_REAL             # <<<<<<<<<<<<<<
 *     SMALLEST_REAL      = PEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = PEP_LARGEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":51
 *     SMALLEST_MAGNITUDE = PEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = PEP_LARGEST_REAL
 *     SMALLEST_REAL      = PEP_SMALLEST_REAL             # <<<<<<<<<<<<<<
 *     LARGEST_IMAGINARY  = PEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":52
 *     LARGEST_REAL       = PEP_LARGEST_REAL
 *     SMALLEST_REAL      = PEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = PEP_LARGEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = PEP_TARGET_MAGNITUDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":53
 *     SMALLEST_REAL      = PEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = PEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     TARGET_MAGNITUDE   = PEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = PEP_TARGET_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":54
 *     LARGEST_IMAGINARY  = PEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = PEP_TARGET_MAGNITUDE             # <<<<<<<<<<<<<<
 *     TARGET_REAL        = PEP_TARGET_REAL
 *     TARGET_IMAGINARY   = PEP_TARGET_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(15, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":55
 *     SMALLEST_IMAGINARY = PEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = PEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = PEP_TARGET_REAL             # <<<<<<<<<<<<<<
 *     TARGET_IMAGINARY   = PEP_TARGET_IMAGINARY
 *     USER               = PEP_WHICH_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(15, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":56
 *     TARGET_MAGNITUDE   = PEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = PEP_TARGET_REAL
 *     TARGET_IMAGINARY   = PEP_TARGET_IMAGINARY             # <<<<<<<<<<<<<<
 *     USER               = PEP_WHICH_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(15, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":57
 *     TARGET_REAL        = PEP_TARGET_REAL
 *     TARGET_IMAGINARY   = PEP_TARGET_IMAGINARY
 *     USER               = PEP_WHICH_USER             # <<<<<<<<<<<<<<
 * 
 * class PEPBasis(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPWhich(PEP_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(15, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":33
 *     GYROSCOPIC = PEP_GYROSCOPIC
 * 
 * class PEPWhich(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP desired part of spectrum
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPWhich, __pyx_t_5) < 0) __PYX_ERR(15, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":59
 *     USER               = PEP_WHICH_USER
 * 
 * class PEPBasis(object):             # <<<<<<<<<<<<<<
 *     MONOMIAL   = PEP_BASIS_MONOMIAL
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPBasis, __pyx_n_s_PEPBasis, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":60
 * 
 * class PEPBasis(object):
 *     MONOMIAL   = PEP_BASIS_MONOMIAL             # <<<<<<<<<<<<<<
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1
 *     CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_MONOMIAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MONOMIAL, __pyx_t_5) < 0) __PYX_ERR(15, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":61
 * class PEPBasis(object):
 *     MONOMIAL   = PEP_BASIS_MONOMIAL
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1             # <<<<<<<<<<<<<<
 *     CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2
 *     LEGENDRE   = PEP_BASIS_LEGENDRE
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHEBYSHEV1, __pyx_t_5) < 0) __PYX_ERR(15, 61, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":62
 *     MONOMIAL   = PEP_BASIS_MONOMIAL
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1
 *     CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2             # <<<<<<<<<<<<<<
 *     LEGENDRE   = PEP_BASIS_LEGENDRE
 *     LAGUERRE   = PEP_BASIS_LAGUERRE
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_CHEBYSHEV2); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CHEBYSHEV2, __pyx_t_5) < 0) __PYX_ERR(15, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":63
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1
 *     CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2
 *     LEGENDRE   = PEP_BASIS_LEGENDRE             # <<<<<<<<<<<<<<
 *     LAGUERRE   = PEP_BASIS_LAGUERRE
 *     HERMITE    = PEP_BASIS_HERMITE
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LEGENDRE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LEGENDRE, __pyx_t_5) < 0) __PYX_ERR(15, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":64
 *     CHEBYSHEV2 = PEP_BASIS_CHEBYSHEV2
 *     LEGENDRE   = PEP_BASIS_LEGENDRE
 *     LAGUERRE   = PEP_BASIS_LAGUERRE             # <<<<<<<<<<<<<<
 *     HERMITE    = PEP_BASIS_HERMITE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_LAGUERRE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LAGUERRE, __pyx_t_5) < 0) __PYX_ERR(15, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":65
 *     LEGENDRE   = PEP_BASIS_LEGENDRE
 *     LAGUERRE   = PEP_BASIS_LAGUERRE
 *     HERMITE    = PEP_BASIS_HERMITE             # <<<<<<<<<<<<<<
 * 
 * class PEPScale(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPBasis(PEP_BASIS_HERMITE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_HERMITE, __pyx_t_5) < 0) __PYX_ERR(15, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":59
 *     USER               = PEP_WHICH_USER
 * 
 * class PEPBasis(object):             # <<<<<<<<<<<<<<
 *     MONOMIAL   = PEP_BASIS_MONOMIAL
 *     CHEBYSHEV1 = PEP_BASIS_CHEBYSHEV1
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPBasis, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPBasis, __pyx_t_5) < 0) __PYX_ERR(15, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":67
 *     HERMITE    = PEP_BASIS_HERMITE
 * 
 * class PEPScale(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP scaling strategy
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPScale, __pyx_n_s_PEPScale, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_scaling_strategy_NONE_No_sc); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":76
 *     - `BOTH`:     Both parameter and diagonal scaling.
 *     """
 *     NONE     = PEP_SCALE_NONE             # <<<<<<<<<<<<<<
 *     SCALAR   = PEP_SCALE_SCALAR
 *     DIAGONAL = PEP_SCALE_DIAGONAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":77
 *     """
 *     NONE     = PEP_SCALE_NONE
 *     SCALAR   = PEP_SCALE_SCALAR             # <<<<<<<<<<<<<<
 *     DIAGONAL = PEP_SCALE_DIAGONAL
 *     BOTH     = PEP_SCALE_BOTH
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_SCALAR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCALAR, __pyx_t_5) < 0) __PYX_ERR(15, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":78
 *     NONE     = PEP_SCALE_NONE
 *     SCALAR   = PEP_SCALE_SCALAR
 *     DIAGONAL = PEP_SCALE_DIAGONAL             # <<<<<<<<<<<<<<
 *     BOTH     = PEP_SCALE_BOTH
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_DIAGONAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIAGONAL, __pyx_t_5) < 0) __PYX_ERR(15, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":79
 *     SCALAR   = PEP_SCALE_SCALAR
 *     DIAGONAL = PEP_SCALE_DIAGONAL
 *     BOTH     = PEP_SCALE_BOTH             # <<<<<<<<<<<<<<
 * 
 * class PEPRefine(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPScale(PEP_SCALE_BOTH); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BOTH, __pyx_t_5) < 0) __PYX_ERR(15, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":67
 *     HERMITE    = PEP_BASIS_HERMITE
 * 
 * class PEPScale(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP scaling strategy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPScale, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPScale, __pyx_t_5) < 0) __PYX_ERR(15, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":81
 *     BOTH     = PEP_SCALE_BOTH
 * 
 * class PEPRefine(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP refinement strategy
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPRefine, __pyx_n_s_PEPRefine, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_refinement_strategy_NONE_No); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":89
 *     - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).
 *     """
 *     NONE     = PEP_REFINE_NONE             # <<<<<<<<<<<<<<
 *     SIMPLE   = PEP_REFINE_SIMPLE
 *     MULTIPLE = PEP_REFINE_MULTIPLE
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":90
 *     """
 *     NONE     = PEP_REFINE_NONE
 *     SIMPLE   = PEP_REFINE_SIMPLE             # <<<<<<<<<<<<<<
 *     MULTIPLE = PEP_REFINE_MULTIPLE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SIMPLE, __pyx_t_5) < 0) __PYX_ERR(15, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":91
 *     NONE     = PEP_REFINE_NONE
 *     SIMPLE   = PEP_REFINE_SIMPLE
 *     MULTIPLE = PEP_REFINE_MULTIPLE             # <<<<<<<<<<<<<<
 * 
 * class PEPRefineScheme(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefine(PEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLE, __pyx_t_5) < 0) __PYX_ERR(15, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":81
 *     BOTH     = PEP_SCALE_BOTH
 * 
 * class PEPRefine(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP refinement strategy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPRefine, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefine, __pyx_t_5) < 0) __PYX_ERR(15, 81, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":93
 *     MULTIPLE = PEP_REFINE_MULTIPLE
 * 
 * class PEPRefineScheme(object):             # <<<<<<<<<<<<<<
 *     """
 *     Scheme for solving linear systems during iterative refinement
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPRefineScheme, __pyx_n_s_PEPRefineScheme, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Scheme_for_solving_linear_syste); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":101
 *     - `EXPLICIT`: Build the explicit matrix.
 *     """
 *     SCHUR    = PEP_REFINE_SCHEME_SCHUR             # <<<<<<<<<<<<<<
 *     MBE      = PEP_REFINE_SCHEME_MBE
 *     EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCHUR, __pyx_t_5) < 0) __PYX_ERR(15, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":102
 *     """
 *     SCHUR    = PEP_REFINE_SCHEME_SCHUR
 *     MBE      = PEP_REFINE_SCHEME_MBE             # <<<<<<<<<<<<<<
 *     EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MBE, __pyx_t_5) < 0) __PYX_ERR(15, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":103
 *     SCHUR    = PEP_REFINE_SCHEME_SCHUR
 *     MBE      = PEP_REFINE_SCHEME_MBE
 *     EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT             # <<<<<<<<<<<<<<
 * 
 * class PEPExtract(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPRefineScheme(PEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPLICIT, __pyx_t_5) < 0) __PYX_ERR(15, 103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":93
 *     MULTIPLE = PEP_REFINE_MULTIPLE
 * 
 * class PEPRefineScheme(object):             # <<<<<<<<<<<<<<
 *     """
 *     Scheme for solving linear systems during iterative refinement
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPRefineScheme, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPRefineScheme, __pyx_t_5) < 0) __PYX_ERR(15, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":105
 *     EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT
 * 
 * class PEPExtract(object):             # <<<<<<<<<<<<<<
 *     """
 *     Extraction strategy used to obtain eigenvectors of the PEP from the
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPExtract, __pyx_n_s_PEPExtract, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Extraction_strategy_used_to_obt); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":115
 *     - `STRUCTURED`: Combine all blocks in a certain way.
 *     """
 *     NONE       = PEP_EXTRACT_NONE             # <<<<<<<<<<<<<<
 *     NORM       = PEP_EXTRACT_NORM
 *     RESIDUAL   = PEP_EXTRACT_RESIDUAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(15, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":116
 *     """
 *     NONE       = PEP_EXTRACT_NONE
 *     NORM       = PEP_EXTRACT_NORM             # <<<<<<<<<<<<<<
 *     RESIDUAL   = PEP_EXTRACT_RESIDUAL
 *     STRUCTURED = PEP_EXTRACT_STRUCTURED
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(15, 116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":117
 *     NONE       = PEP_EXTRACT_NONE
 *     NORM       = PEP_EXTRACT_NORM
 *     RESIDUAL   = PEP_EXTRACT_RESIDUAL             # <<<<<<<<<<<<<<
 *     STRUCTURED = PEP_EXTRACT_STRUCTURED
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_RESIDUAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RESIDUAL, __pyx_t_5) < 0) __PYX_ERR(15, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":118
 *     NORM       = PEP_EXTRACT_NORM
 *     RESIDUAL   = PEP_EXTRACT_RESIDUAL
 *     STRUCTURED = PEP_EXTRACT_STRUCTURED             # <<<<<<<<<<<<<<
 * 
 * class PEPErrorType(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPExtract(PEP_EXTRACT_STRUCTURED); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_STRUCTURED, __pyx_t_5) < 0) __PYX_ERR(15, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":105
 *     EXPLICIT = PEP_REFINE_SCHEME_EXPLICIT
 * 
 * class PEPExtract(object):             # <<<<<<<<<<<<<<
 *     """
 *     Extraction strategy used to obtain eigenvectors of the PEP from the
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPExtract, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPExtract, __pyx_t_5) < 0) __PYX_ERR(15, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":120
 *     STRUCTURED = PEP_EXTRACT_STRUCTURED
 * 
 * class PEPErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP error type to assess accuracy of computed solutions
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPErrorType, __pyx_n_s_PEPErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":128
 *     - `BACKWARD`:  Backward error.
 *     """
 *     ABSOLUTE = PEP_ERROR_ABSOLUTE             # <<<<<<<<<<<<<<
 *     RELATIVE = PEP_ERROR_RELATIVE
 *     BACKWARD = PEP_ERROR_BACKWARD
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(15, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":129
 *     """
 *     ABSOLUTE = PEP_ERROR_ABSOLUTE
 *     RELATIVE = PEP_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *     BACKWARD = PEP_ERROR_BACKWARD
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(15, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":130
 *     ABSOLUTE = PEP_ERROR_ABSOLUTE
 *     RELATIVE = PEP_ERROR_RELATIVE
 *     BACKWARD = PEP_ERROR_BACKWARD             # <<<<<<<<<<<<<<
 * 
 * class PEPConv(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPErrorType(PEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(15, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":120
 *     STRUCTURED = PEP_EXTRACT_STRUCTURED
 * 
 * class PEPErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP error type to assess accuracy of computed solutions
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPErrorType, __pyx_t_5) < 0) __PYX_ERR(15, 120, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":132
 *     BACKWARD = PEP_ERROR_BACKWARD
 * 
 * class PEPConv(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP convergence test
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPConv, __pyx_n_s_PEPConv, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_convergence_test_ABS_REL_NO); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":141
 *     - `USER`:
 *     """
 *     ABS  = PEP_CONV_ABS             # <<<<<<<<<<<<<<
 *     REL  = PEP_CONV_REL
 *     NORM = PEP_CONV_NORM
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_ABS); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABS, __pyx_t_5) < 0) __PYX_ERR(15, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":142
 *     """
 *     ABS  = PEP_CONV_ABS
 *     REL  = PEP_CONV_REL             # <<<<<<<<<<<<<<
 *     NORM = PEP_CONV_NORM
 *     USER = PEP_CONV_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_REL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_REL, __pyx_t_5) < 0) __PYX_ERR(15, 142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":143
 *     ABS  = PEP_CONV_ABS
 *     REL  = PEP_CONV_REL
 *     NORM = PEP_CONV_NORM             # <<<<<<<<<<<<<<
 *     USER = PEP_CONV_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_NORM); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NORM, __pyx_t_5) < 0) __PYX_ERR(15, 143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":144
 *     REL  = PEP_CONV_REL
 *     NORM = PEP_CONV_NORM
 *     USER = PEP_CONV_USER             # <<<<<<<<<<<<<<
 * 
 * class PEPConvergedReason(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConv(PEP_CONV_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(15, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":132
 *     BACKWARD = PEP_ERROR_BACKWARD
 * 
 * class PEPConv(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP convergence test
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPConv, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConv, __pyx_t_5) < 0) __PYX_ERR(15, 132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":146
 *     USER = PEP_CONV_USER
 * 
 * class PEPConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP convergence reasons
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(15, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_PEPConvergedReason, __pyx_n_s_PEPConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_PEP_convergence_reasons_CONVERG); if (unlikely(!__pyx_t_4)) __PYX_ERR(15, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/PEP.pyx":157
 *     - `CONVERGED_ITERATING`:
 *     """
 *     CONVERGED_TOL          = PEP_CONVERGED_TOL             # <<<<<<<<<<<<<<
 *     CONVERGED_USER         = PEP_CONVERGED_USER
 *     DIVERGED_ITS           = PEP_DIVERGED_ITS
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(15, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":158
 *     """
 *     CONVERGED_TOL          = PEP_CONVERGED_TOL
 *     CONVERGED_USER         = PEP_CONVERGED_USER             # <<<<<<<<<<<<<<
 *     DIVERGED_ITS           = PEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = PEP_DIVERGED_BREAKDOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(15, 158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":159
 *     CONVERGED_TOL          = PEP_CONVERGED_TOL
 *     CONVERGED_USER         = PEP_CONVERGED_USER
 *     DIVERGED_ITS           = PEP_DIVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_BREAKDOWN     = PEP_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(15, 159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":160
 *     CONVERGED_USER         = PEP_CONVERGED_USER
 *     DIVERGED_ITS           = PEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = PEP_DIVERGED_BREAKDOWN             # <<<<<<<<<<<<<<
 *     DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = PEP_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(15, 160, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":161
 *     DIVERGED_ITS           = PEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = PEP_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST             # <<<<<<<<<<<<<<
 *     CONVERGED_ITERATING    = PEP_CONVERGED_ITERATING
 *     ITERATING              = PEP_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_DIVERGED_SYMMETRY_LOST); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_SYMMETRY_LOST, __pyx_t_5) < 0) __PYX_ERR(15, 161, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":162
 *     DIVERGED_BREAKDOWN     = PEP_DIVERGED_BREAKDOWN
 *     DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = PEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *     ITERATING              = PEP_CONVERGED_ITERATING
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(15, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":163
 *     DIVERGED_SYMMETRY_LOST = PEP_DIVERGED_SYMMETRY_LOST
 *     CONVERGED_ITERATING    = PEP_CONVERGED_ITERATING
 *     ITERATING              = PEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_PEPConvergedReason(PEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(15, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/PEP.pyx":146
 *     USER = PEP_CONV_USER
 * 
 * class PEPConvergedReason(object):             # <<<<<<<<<<<<<<
 *     """
 *     PEP convergence reasons
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_PEPConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(15, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PEPConvergedReason, __pyx_t_5) < 0) __PYX_ERR(15, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/PEP.pyx":173
 *     """
 * 
 *     Type            = PEPType             # <<<<<<<<<<<<<<
 *     ProblemType     = PEPProblemType
 *     Which           = PEPWhich
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(15, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":174
 * 
 *     Type            = PEPType
 *     ProblemType     = PEPProblemType             # <<<<<<<<<<<<<<
 *     Which           = PEPWhich
 *     Basis           = PEPBasis
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPProblemType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ProblemType, __pyx_t_2) < 0) __PYX_ERR(15, 174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":175
 *     Type            = PEPType
 *     ProblemType     = PEPProblemType
 *     Which           = PEPWhich             # <<<<<<<<<<<<<<
 *     Basis           = PEPBasis
 *     Scale           = PEPScale
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(15, 175, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":176
 *     ProblemType     = PEPProblemType
 *     Which           = PEPWhich
 *     Basis           = PEPBasis             # <<<<<<<<<<<<<<
 *     Scale           = PEPScale
 *     Refine          = PEPRefine
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPBasis); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Basis, __pyx_t_2) < 0) __PYX_ERR(15, 176, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":177
 *     Which           = PEPWhich
 *     Basis           = PEPBasis
 *     Scale           = PEPScale             # <<<<<<<<<<<<<<
 *     Refine          = PEPRefine
 *     RefineScheme    = PEPRefineScheme
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPScale); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Scale, __pyx_t_2) < 0) __PYX_ERR(15, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":178
 *     Basis           = PEPBasis
 *     Scale           = PEPScale
 *     Refine          = PEPRefine             # <<<<<<<<<<<<<<
 *     RefineScheme    = PEPRefineScheme
 *     Extract         = PEPExtract
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPRefine); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Refine, __pyx_t_2) < 0) __PYX_ERR(15, 178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":179
 *     Scale           = PEPScale
 *     Refine          = PEPRefine
 *     RefineScheme    = PEPRefineScheme             # <<<<<<<<<<<<<<
 *     Extract         = PEPExtract
 *     ErrorType       = PEPErrorType
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPRefineScheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_2) < 0) __PYX_ERR(15, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":180
 *     Refine          = PEPRefine
 *     RefineScheme    = PEPRefineScheme
 *     Extract         = PEPExtract             # <<<<<<<<<<<<<<
 *     ErrorType       = PEPErrorType
 *     Conv            = PEPConv
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPExtract); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Extract, __pyx_t_2) < 0) __PYX_ERR(15, 180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":181
 *     RefineScheme    = PEPRefineScheme
 *     Extract         = PEPExtract
 *     ErrorType       = PEPErrorType             # <<<<<<<<<<<<<<
 *     Conv            = PEPConv
 *     ConvergedReason = PEPConvergedReason
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(15, 181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":182
 *     Extract         = PEPExtract
 *     ErrorType       = PEPErrorType
 *     Conv            = PEPConv             # <<<<<<<<<<<<<<
 *     ConvergedReason = PEPConvergedReason
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPConv); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_Conv, __pyx_t_2) < 0) __PYX_ERR(15, 182, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":183
 *     ErrorType       = PEPErrorType
 *     Conv            = PEPConv
 *     ConvergedReason = PEPConvergedReason             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PEPConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(15, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_PEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(15, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_PEP);

  /* "SLEPc/PEP.pyx":1036
 * # -----------------------------------------------------------------------------
 * 
 * del PEPType             # <<<<<<<<<<<<<<
 * del PEPProblemType
 * del PEPWhich
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPType) < 0) __PYX_ERR(15, 1036, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1037
 * 
 * del PEPType
 * del PEPProblemType             # <<<<<<<<<<<<<<
 * del PEPWhich
 * del PEPBasis
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPProblemType) < 0) __PYX_ERR(15, 1037, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1038
 * del PEPType
 * del PEPProblemType
 * del PEPWhich             # <<<<<<<<<<<<<<
 * del PEPBasis
 * del PEPScale
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPWhich) < 0) __PYX_ERR(15, 1038, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1039
 * del PEPProblemType
 * del PEPWhich
 * del PEPBasis             # <<<<<<<<<<<<<<
 * del PEPScale
 * del PEPRefine
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPBasis) < 0) __PYX_ERR(15, 1039, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1040
 * del PEPWhich
 * del PEPBasis
 * del PEPScale             # <<<<<<<<<<<<<<
 * del PEPRefine
 * del PEPRefineScheme
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPScale) < 0) __PYX_ERR(15, 1040, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1041
 * del PEPBasis
 * del PEPScale
 * del PEPRefine             # <<<<<<<<<<<<<<
 * del PEPRefineScheme
 * del PEPExtract
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefine) < 0) __PYX_ERR(15, 1041, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1042
 * del PEPScale
 * del PEPRefine
 * del PEPRefineScheme             # <<<<<<<<<<<<<<
 * del PEPExtract
 * del PEPErrorType
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPRefineScheme) < 0) __PYX_ERR(15, 1042, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1043
 * del PEPRefine
 * del PEPRefineScheme
 * del PEPExtract             # <<<<<<<<<<<<<<
 * del PEPErrorType
 * del PEPConv
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPExtract) < 0) __PYX_ERR(15, 1043, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1044
 * del PEPRefineScheme
 * del PEPExtract
 * del PEPErrorType             # <<<<<<<<<<<<<<
 * del PEPConv
 * del PEPConvergedReason
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPErrorType) < 0) __PYX_ERR(15, 1044, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1045
 * del PEPExtract
 * del PEPErrorType
 * del PEPConv             # <<<<<<<<<<<<<<
 * del PEPConvergedReason
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConv) < 0) __PYX_ERR(15, 1045, __pyx_L1_error)

  /* "SLEPc/PEP.pyx":1046
 * del PEPErrorType
 * del PEPConv
 * del PEPConvergedReason             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_PEPConvergedReason) < 0) __PYX_ERR(15, 1046, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class NEPType(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPType, __pyx_n_s_NEPType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_type_Nonlinear_eigensolvers); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":16
 *     - `NLEIGS`:   Fully rational Krylov method for nonlinear eigenproblems.
 *     """
 *     RII      = S_(NEPRII)             # <<<<<<<<<<<<<<
 *     SLP      = S_(NEPSLP)
 *     NARNOLDI = S_(NEPNARNOLDI)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPRII); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RII, __pyx_t_5) < 0) __PYX_ERR(16, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":17
 *     """
 *     RII      = S_(NEPRII)
 *     SLP      = S_(NEPSLP)             # <<<<<<<<<<<<<<
 *     NARNOLDI = S_(NEPNARNOLDI)
 *     CISS     = S_(NEPCISS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPSLP); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SLP, __pyx_t_5) < 0) __PYX_ERR(16, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":18
 *     RII      = S_(NEPRII)
 *     SLP      = S_(NEPSLP)
 *     NARNOLDI = S_(NEPNARNOLDI)             # <<<<<<<<<<<<<<
 *     CISS     = S_(NEPCISS)
 *     INTERPOL = S_(NEPINTERPOL)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNARNOLDI); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NARNOLDI, __pyx_t_5) < 0) __PYX_ERR(16, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":19
 *     SLP      = S_(NEPSLP)
 *     NARNOLDI = S_(NEPNARNOLDI)
 *     CISS     = S_(NEPCISS)             # <<<<<<<<<<<<<<
 *     INTERPOL = S_(NEPINTERPOL)
 *     NLEIGS   = S_(NEPNLEIGS)
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPCISS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CISS, __pyx_t_5) < 0) __PYX_ERR(16, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":20
 *     NARNOLDI = S_(NEPNARNOLDI)
 *     CISS     = S_(NEPCISS)
 *     INTERPOL = S_(NEPINTERPOL)             # <<<<<<<<<<<<<<
 *     NLEIGS   = S_(NEPNLEIGS)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPINTERPOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_INTERPOL, __pyx_t_5) < 0) __PYX_ERR(16, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":21
 *     CISS     = S_(NEPCISS)
 *     INTERPOL = S_(NEPINTERPOL)
 *     NLEIGS   = S_(NEPNLEIGS)             # <<<<<<<<<<<<<<
 * 
 * class NEPErrorType(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(NEPNLEIGS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NLEIGS, __pyx_t_5) < 0) __PYX_ERR(16, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class NEPType(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPType, __pyx_t_5) < 0) __PYX_ERR(16, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":23
 *     NLEIGS   = S_(NEPNLEIGS)
 * 
 * class NEPErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP error type to assess accuracy of computed solutions
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPErrorType, __pyx_n_s_NEPErrorType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_error_type_to_assess_accura); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":31
 *     - `BACKWARD`:  Backward error.
 *     """
 *     ABSOLUTE = NEP_ERROR_ABSOLUTE             # <<<<<<<<<<<<<<
 *     RELATIVE = NEP_ERROR_RELATIVE
 *     BACKWARD = NEP_ERROR_BACKWARD
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_ABSOLUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ABSOLUTE, __pyx_t_5) < 0) __PYX_ERR(16, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":32
 *     """
 *     ABSOLUTE = NEP_ERROR_ABSOLUTE
 *     RELATIVE = NEP_ERROR_RELATIVE             # <<<<<<<<<<<<<<
 *     BACKWARD = NEP_ERROR_BACKWARD
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_RELATIVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_RELATIVE, __pyx_t_5) < 0) __PYX_ERR(16, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":33
 *     ABSOLUTE = NEP_ERROR_ABSOLUTE
 *     RELATIVE = NEP_ERROR_RELATIVE
 *     BACKWARD = NEP_ERROR_BACKWARD             # <<<<<<<<<<<<<<
 * 
 * class NEPWhich(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPErrorType(NEP_ERROR_BACKWARD); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_BACKWARD, __pyx_t_5) < 0) __PYX_ERR(16, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":23
 *     NLEIGS   = S_(NEPNLEIGS)
 * 
 * class NEPErrorType(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP error type to assess accuracy of computed solutions
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPErrorType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPErrorType, __pyx_t_5) < 0) __PYX_ERR(16, 23, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":35
 *     BACKWARD = NEP_ERROR_BACKWARD
 * 
 * class NEPWhich(object):             # <<<<<<<<<<<<<<
 *     LARGEST_MAGNITUDE  = NEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPWhich, __pyx_n_s_NEPWhich, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":36
 * 
 * class NEPWhich(object):
 *     LARGEST_MAGNITUDE  = NEP_LARGEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = NEP_LARGEST_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":37
 * class NEPWhich(object):
 *     LARGEST_MAGNITUDE  = NEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE             # <<<<<<<<<<<<<<
 *     LARGEST_REAL       = NEP_LARGEST_REAL
 *     SMALLEST_REAL      = NEP_SMALLEST_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 37, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":38
 *     LARGEST_MAGNITUDE  = NEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = NEP_LARGEST_REAL             # <<<<<<<<<<<<<<
 *     SMALLEST_REAL      = NEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = NEP_LARGEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":39
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE
 *     LARGEST_REAL       = NEP_LARGEST_REAL
 *     SMALLEST_REAL      = NEP_SMALLEST_REAL             # <<<<<<<<<<<<<<
 *     LARGEST_IMAGINARY  = NEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":40
 *     LARGEST_REAL       = NEP_LARGEST_REAL
 *     SMALLEST_REAL      = NEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = NEP_LARGEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = NEP_TARGET_MAGNITUDE
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_LARGEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_LARGEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":41
 *     SMALLEST_REAL      = NEP_SMALLEST_REAL
 *     LARGEST_IMAGINARY  = NEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY             # <<<<<<<<<<<<<<
 *     TARGET_MAGNITUDE   = NEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = NEP_TARGET_REAL
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_SMALLEST_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SMALLEST_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":42
 *     LARGEST_IMAGINARY  = NEP_LARGEST_IMAGINARY
 *     SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = NEP_TARGET_MAGNITUDE             # <<<<<<<<<<<<<<
 *     TARGET_REAL        = NEP_TARGET_REAL
 *     TARGET_IMAGINARY   = NEP_TARGET_IMAGINARY
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_MAGNITUDE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_MAGNITUDE, __pyx_t_5) < 0) __PYX_ERR(16, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":43
 *     SMALLEST_IMAGINARY = NEP_SMALLEST_IMAGINARY
 *     TARGET_MAGNITUDE   = NEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = NEP_TARGET_REAL             # <<<<<<<<<<<<<<
 *     TARGET_IMAGINARY   = NEP_TARGET_IMAGINARY
 *     ALL                = NEP_ALL
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_REAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_REAL, __pyx_t_5) < 0) __PYX_ERR(16, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":44
 *     TARGET_MAGNITUDE   = NEP_TARGET_MAGNITUDE
 *     TARGET_REAL        = NEP_TARGET_REAL
 *     TARGET_IMAGINARY   = NEP_TARGET_IMAGINARY             # <<<<<<<<<<<<<<
 *     ALL                = NEP_ALL
 *     USER               = NEP_WHICH_USER
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_TARGET_IMAGINARY); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_TARGET_IMAGINARY, __pyx_t_5) < 0) __PYX_ERR(16, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":45
 *     TARGET_REAL        = NEP_TARGET_REAL
 *     TARGET_IMAGINARY   = NEP_TARGET_IMAGINARY
 *     ALL                = NEP_ALL             # <<<<<<<<<<<<<<
 *     USER               = NEP_WHICH_USER
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_ALL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ALL, __pyx_t_5) < 0) __PYX_ERR(16, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":46
 *     TARGET_IMAGINARY   = NEP_TARGET_IMAGINARY
 *     ALL                = NEP_ALL
 *     USER               = NEP_WHICH_USER             # <<<<<<<<<<<<<<
 * 
 * class NEPConvergedReason(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPWhich(NEP_WHICH_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_USER, __pyx_t_5) < 0) __PYX_ERR(16, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":35
 *     BACKWARD = NEP_ERROR_BACKWARD
 * 
 * class NEPWhich(object):             # <<<<<<<<<<<<<<
 *     LARGEST_MAGNITUDE  = NEP_LARGEST_MAGNITUDE
 *     SMALLEST_MAGNITUDE = NEP_SMALLEST_MAGNITUDE
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPWhich, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPWhich, __pyx_t_5) < 0) __PYX_ERR(16, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":48
 *     USER               = NEP_WHICH_USER
 * 
 * class NEPConvergedReason(object):             # <<<<<<<<<<<<<<
 *     CONVERGED_TOL          = NEP_CONVERGED_TOL
 *     CONVERGED_USER         = NEP_CONVERGED_USER
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPConvergedReason, __pyx_n_s_NEPConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":49
 * 
 * class NEPConvergedReason(object):
 *     CONVERGED_TOL          = NEP_CONVERGED_TOL             # <<<<<<<<<<<<<<
 *     CONVERGED_USER         = NEP_CONVERGED_USER
 *     DIVERGED_ITS           = NEP_DIVERGED_ITS
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(16, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":50
 * class NEPConvergedReason(object):
 *     CONVERGED_TOL          = NEP_CONVERGED_TOL
 *     CONVERGED_USER         = NEP_CONVERGED_USER             # <<<<<<<<<<<<<<
 *     DIVERGED_ITS           = NEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = NEP_DIVERGED_BREAKDOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_USER); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_USER, __pyx_t_5) < 0) __PYX_ERR(16, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":51
 *     CONVERGED_TOL          = NEP_CONVERGED_TOL
 *     CONVERGED_USER         = NEP_CONVERGED_USER
 *     DIVERGED_ITS           = NEP_DIVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_BREAKDOWN     = NEP_DIVERGED_BREAKDOWN
 *     DIVERGED_LINEAR_SOLVE  = NEP_DIVERGED_LINEAR_SOLVE
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(16, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":52
 *     CONVERGED_USER         = NEP_CONVERGED_USER
 *     DIVERGED_ITS           = NEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = NEP_DIVERGED_BREAKDOWN             # <<<<<<<<<<<<<<
 *     DIVERGED_LINEAR_SOLVE  = NEP_DIVERGED_LINEAR_SOLVE
 *     CONVERGED_ITERATING    = NEP_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(16, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":53
 *     DIVERGED_ITS           = NEP_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN     = NEP_DIVERGED_BREAKDOWN
 *     DIVERGED_LINEAR_SOLVE  = NEP_DIVERGED_LINEAR_SOLVE             # <<<<<<<<<<<<<<
 *     CONVERGED_ITERATING    = NEP_CONVERGED_ITERATING
 *     ITERATING              = NEP_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_DIVERGED_LINEAR_SOLVE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_LINEAR_SOLVE, __pyx_t_5) < 0) __PYX_ERR(16, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":54
 *     DIVERGED_BREAKDOWN     = NEP_DIVERGED_BREAKDOWN
 *     DIVERGED_LINEAR_SOLVE  = NEP_DIVERGED_LINEAR_SOLVE
 *     CONVERGED_ITERATING    = NEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *     ITERATING              = NEP_CONVERGED_ITERATING
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(16, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":55
 *     DIVERGED_LINEAR_SOLVE  = NEP_DIVERGED_LINEAR_SOLVE
 *     CONVERGED_ITERATING    = NEP_CONVERGED_ITERATING
 *     ITERATING              = NEP_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 * 
 * class NEPRefine(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPConvergedReason(NEP_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(16, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":48
 *     USER               = NEP_WHICH_USER
 * 
 * class NEPConvergedReason(object):             # <<<<<<<<<<<<<<
 *     CONVERGED_TOL          = NEP_CONVERGED_TOL
 *     CONVERGED_USER         = NEP_CONVERGED_USER
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPConvergedReason, __pyx_t_5) < 0) __PYX_ERR(16, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":57
 *     ITERATING              = NEP_CONVERGED_ITERATING
 * 
 * class NEPRefine(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP refinement strategy
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPRefine, __pyx_n_s_NEPRefine, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_NEP_refinement_strategy_NONE_No); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":65
 *     - `MULTIPLE`: Refine all eigenpairs simultaneously (invariant pair).
 *     """
 *     NONE     = NEP_REFINE_NONE             # <<<<<<<<<<<<<<
 *     SIMPLE   = NEP_REFINE_SIMPLE
 *     MULTIPLE = NEP_REFINE_MULTIPLE
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_NONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_NONE, __pyx_t_5) < 0) __PYX_ERR(16, 65, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":66
 *     """
 *     NONE     = NEP_REFINE_NONE
 *     SIMPLE   = NEP_REFINE_SIMPLE             # <<<<<<<<<<<<<<
 *     MULTIPLE = NEP_REFINE_MULTIPLE
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_SIMPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 66, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SIMPLE, __pyx_t_5) < 0) __PYX_ERR(16, 66, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":67
 *     NONE     = NEP_REFINE_NONE
 *     SIMPLE   = NEP_REFINE_SIMPLE
 *     MULTIPLE = NEP_REFINE_MULTIPLE             # <<<<<<<<<<<<<<
 * 
 * class NEPRefineScheme(object):
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefine(NEP_REFINE_MULTIPLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 67, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MULTIPLE, __pyx_t_5) < 0) __PYX_ERR(16, 67, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":57
 *     ITERATING              = NEP_CONVERGED_ITERATING
 * 
 * class NEPRefine(object):             # <<<<<<<<<<<<<<
 *     """
 *     NEP refinement strategy
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPRefine, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefine, __pyx_t_5) < 0) __PYX_ERR(16, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":69
 *     MULTIPLE = NEP_REFINE_MULTIPLE
 * 
 * class NEPRefineScheme(object):             # <<<<<<<<<<<<<<
 *     """
 *     Scheme for solving linear systems during iterative refinement
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_NEPRefineScheme, __pyx_n_s_NEPRefineScheme, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_Scheme_for_solving_linear_syste); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/NEP.pyx":77
 *     - `EXPLICIT`: Build the explicit matrix.
 *     """
 *     SCHUR    = NEP_REFINE_SCHEME_SCHUR             # <<<<<<<<<<<<<<
 *     MBE      = NEP_REFINE_SCHEME_MBE
 *     EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_SCHUR); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_SCHUR, __pyx_t_5) < 0) __PYX_ERR(16, 77, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":78
 *     """
 *     SCHUR    = NEP_REFINE_SCHEME_SCHUR
 *     MBE      = NEP_REFINE_SCHEME_MBE             # <<<<<<<<<<<<<<
 *     EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_MBE); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_MBE, __pyx_t_5) < 0) __PYX_ERR(16, 78, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":79
 *     SCHUR    = NEP_REFINE_SCHEME_SCHUR
 *     MBE      = NEP_REFINE_SCHEME_MBE
 *     EXPLICIT = NEP_REFINE_SCHEME_EXPLICIT             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_NEPRefineScheme(NEP_REFINE_SCHEME_EXPLICIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPLICIT, __pyx_t_5) < 0) __PYX_ERR(16, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/NEP.pyx":69
 *     MULTIPLE = NEP_REFINE_MULTIPLE
 * 
 * class NEPRefineScheme(object):             # <<<<<<<<<<<<<<
 *     """
 *     Scheme for solving linear systems during iterative refinement
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_NEPRefineScheme, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(16, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NEPRefineScheme, __pyx_t_5) < 0) __PYX_ERR(16, 69, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/NEP.pyx":89
 *     """
 * 
 *     Type            = NEPType             # <<<<<<<<<<<<<<
 *     ErrorType       = NEPErrorType
 *     Which           = NEPWhich
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPType); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(16, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":90
 * 
 *     Type            = NEPType
 *     ErrorType       = NEPErrorType             # <<<<<<<<<<<<<<
 *     Which           = NEPWhich
 *     ConvergedReason = NEPConvergedReason
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPErrorType); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ErrorType, __pyx_t_2) < 0) __PYX_ERR(16, 90, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":91
 *     Type            = NEPType
 *     ErrorType       = NEPErrorType
 *     Which           = NEPWhich             # <<<<<<<<<<<<<<
 *     ConvergedReason = NEPConvergedReason
 *     Refine          = NEPRefine
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPWhich); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Which, __pyx_t_2) < 0) __PYX_ERR(16, 91, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":92
 *     ErrorType       = NEPErrorType
 *     Which           = NEPWhich
 *     ConvergedReason = NEPConvergedReason             # <<<<<<<<<<<<<<
 *     Refine          = NEPRefine
 *     RefineScheme    = NEPRefineScheme
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(16, 92, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":93
 *     Which           = NEPWhich
 *     ConvergedReason = NEPConvergedReason
 *     Refine          = NEPRefine             # <<<<<<<<<<<<<<
 *     RefineScheme    = NEPRefineScheme
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPRefine); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_Refine, __pyx_t_2) < 0) __PYX_ERR(16, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":94
 *     ConvergedReason = NEPConvergedReason
 *     Refine          = NEPRefine
 *     RefineScheme    = NEPRefineScheme             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NEPRefineScheme); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_NEP->tp_dict, __pyx_n_s_RefineScheme, __pyx_t_2) < 0) __PYX_ERR(16, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_NEP);

  /* "SLEPc/NEP.pyx":684
 * # -----------------------------------------------------------------------------
 * 
 * del NEPType             # <<<<<<<<<<<<<<
 * del NEPErrorType
 * del NEPWhich
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPType) < 0) __PYX_ERR(16, 684, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":685
 * 
 * del NEPType
 * del NEPErrorType             # <<<<<<<<<<<<<<
 * del NEPWhich
 * del NEPConvergedReason
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPErrorType) < 0) __PYX_ERR(16, 685, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":686
 * del NEPType
 * del NEPErrorType
 * del NEPWhich             # <<<<<<<<<<<<<<
 * del NEPConvergedReason
 * del NEPRefine
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPWhich) < 0) __PYX_ERR(16, 686, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":687
 * del NEPErrorType
 * del NEPWhich
 * del NEPConvergedReason             # <<<<<<<<<<<<<<
 * del NEPRefine
 * del NEPRefineScheme
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPConvergedReason) < 0) __PYX_ERR(16, 687, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":688
 * del NEPWhich
 * del NEPConvergedReason
 * del NEPRefine             # <<<<<<<<<<<<<<
 * del NEPRefineScheme
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefine) < 0) __PYX_ERR(16, 688, __pyx_L1_error)

  /* "SLEPc/NEP.pyx":689
 * del NEPConvergedReason
 * del NEPRefine
 * del NEPRefineScheme             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_NEPRefineScheme) < 0) __PYX_ERR(16, 689, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class MFNType(object):             # <<<<<<<<<<<<<<
 *     """
 *     MFN type
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_MFNType, __pyx_n_s_MFNType, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, __pyx_kp_s_MFN_type_Action_of_a_matrix_fun); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/MFN.pyx":12
 *     - `EXPOKIT`: Implementation of the method in Expokit.
 *     """
 *     KRYLOV   = S_(MFNKRYLOV)             # <<<<<<<<<<<<<<
 *     EXPOKIT  = S_(MFNEXPOKIT)
 * 
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(MFNKRYLOV); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_KRYLOV, __pyx_t_5) < 0) __PYX_ERR(17, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":13
 *     """
 *     KRYLOV   = S_(MFNKRYLOV)
 *     EXPOKIT  = S_(MFNEXPOKIT)             # <<<<<<<<<<<<<<
 * 
 * class MFNConvergedReason(object):
 */
  __pyx_t_5 = __pyx_f_8slepc4py_5SLEPc_S_(MFNEXPOKIT); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_EXPOKIT, __pyx_t_5) < 0) __PYX_ERR(17, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":3
 * # -----------------------------------------------------------------------------
 * 
 * class MFNType(object):             # <<<<<<<<<<<<<<
 *     """
 *     MFN type
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_MFNType, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNType, __pyx_t_5) < 0) __PYX_ERR(17, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/MFN.pyx":15
 *     EXPOKIT  = S_(MFNEXPOKIT)
 * 
 * class MFNConvergedReason(object):             # <<<<<<<<<<<<<<
 *     CONVERGED_TOL       = MFN_CONVERGED_TOL
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(17, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_MFNConvergedReason, __pyx_n_s_MFNConvergedReason, (PyObject *) NULL, __pyx_n_s_slepc4py_SLEPc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(17, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "SLEPc/MFN.pyx":16
 * 
 * class MFNConvergedReason(object):
 *     CONVERGED_TOL       = MFN_CONVERGED_TOL             # <<<<<<<<<<<<<<
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS
 *     DIVERGED_ITS        = MFN_DIVERGED_ITS
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_TOL); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_TOL, __pyx_t_5) < 0) __PYX_ERR(17, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":17
 * class MFNConvergedReason(object):
 *     CONVERGED_TOL       = MFN_CONVERGED_TOL
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_ITS        = MFN_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = MFN_DIVERGED_BREAKDOWN
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(17, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":18
 *     CONVERGED_TOL       = MFN_CONVERGED_TOL
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS
 *     DIVERGED_ITS        = MFN_DIVERGED_ITS             # <<<<<<<<<<<<<<
 *     DIVERGED_BREAKDOWN  = MFN_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = MFN_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_ITS); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_ITS, __pyx_t_5) < 0) __PYX_ERR(17, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":19
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS
 *     DIVERGED_ITS        = MFN_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = MFN_DIVERGED_BREAKDOWN             # <<<<<<<<<<<<<<
 *     CONVERGED_ITERATING = MFN_CONVERGED_ITERATING
 *     ITERATING           = MFN_CONVERGED_ITERATING
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_DIVERGED_BREAKDOWN); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_DIVERGED_BREAKDOWN, __pyx_t_5) < 0) __PYX_ERR(17, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":20
 *     DIVERGED_ITS        = MFN_DIVERGED_ITS
 *     DIVERGED_BREAKDOWN  = MFN_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = MFN_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 *     ITERATING           = MFN_CONVERGED_ITERATING
 * 
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_CONVERGED_ITERATING, __pyx_t_5) < 0) __PYX_ERR(17, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":21
 *     DIVERGED_BREAKDOWN  = MFN_DIVERGED_BREAKDOWN
 *     CONVERGED_ITERATING = MFN_CONVERGED_ITERATING
 *     ITERATING           = MFN_CONVERGED_ITERATING             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  __pyx_t_5 = __Pyx_PyInt_From_MFNConvergedReason(MFN_CONVERGED_ITERATING); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_ITERATING, __pyx_t_5) < 0) __PYX_ERR(17, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SLEPc/MFN.pyx":15
 *     EXPOKIT  = S_(MFNEXPOKIT)
 * 
 * class MFNConvergedReason(object):             # <<<<<<<<<<<<<<
 *     CONVERGED_TOL       = MFN_CONVERGED_TOL
 *     CONVERGED_ITS       = MFN_CONVERGED_ITS
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_MFNConvergedReason, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(17, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MFNConvergedReason, __pyx_t_5) < 0) __PYX_ERR(17, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __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;

  /* "SLEPc/MFN.pyx":31
 *     """
 * 
 *     Type            = MFNType             # <<<<<<<<<<<<<<
 *     ConvergedReason = MFNConvergedReason
 * 
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MFNType); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_Type, __pyx_t_2) < 0) __PYX_ERR(17, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN);

  /* "SLEPc/MFN.pyx":32
 * 
 *     Type            = MFNType
 *     ConvergedReason = MFNConvergedReason             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MFNConvergedReason); if (unlikely(!__pyx_t_2)) __PYX_ERR(17, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_8slepc4py_5SLEPc_MFN->tp_dict, __pyx_n_s_ConvergedReason, __pyx_t_2) < 0) __PYX_ERR(17, 32, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_8slepc4py_5SLEPc_MFN);

  /* "SLEPc/MFN.pyx":357
 * # -----------------------------------------------------------------------------
 * 
 * del MFNType             # <<<<<<<<<<<<<<
 * del MFNConvergedReason
 * 
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNType) < 0) __PYX_ERR(17, 357, __pyx_L1_error)

  /* "SLEPc/MFN.pyx":358
 * 
 * del MFNType
 * del MFNConvergedReason             # <<<<<<<<<<<<<<
 * 
 * # -----------------------------------------------------------------------------
 */
  if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_MFNConvergedReason) < 0) __PYX_ERR(17, 358, __pyx_L1_error)

  /* "SLEPc/SLEPc.pyx":224
 * # -----------------------------------------------------------------------------
 * 
 * def _initialize(args=None):             # <<<<<<<<<<<<<<
 *     cdef int ready = initialize(args)
 *     if ready: register(NULL)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_1_initialize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize, __pyx_t_2) < 0) __PYX_ERR(4, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "SLEPc/SLEPc.pyx":228
 *     if ready: register(NULL)
 * 
 * def _finalize():             # <<<<<<<<<<<<<<
 *     finalize()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8slepc4py_5SLEPc_3_finalize, NULL, __pyx_n_s_slepc4py_SLEPc); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_finalize, __pyx_t_2) < 0) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  if (__Pyx_RegisterCleanup()) __PYX_ERR(19, 1, __pyx_L1_error);
  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);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init slepc4py.SLEPc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init slepc4py.SLEPc");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

static void __Pyx_CleanupGlobals(void) {
  Py_CLEAR(__pyx_tuple_);
  Py_CLEAR(__pyx_tuple__3);
  Py_CLEAR(__pyx_tuple__4);
  Py_CLEAR(__pyx_tuple__5);
  Py_CLEAR(__pyx_tuple__6);
  Py_CLEAR(__pyx_codeobj__7);
  Py_CLEAR(__pyx_codeobj__8);
  /* CodeObjectCache.cleanup */
  if (__pyx_code_cache.entries) {
      __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
      int i, count = __pyx_code_cache.count;
      __pyx_code_cache.count = 0;
      __pyx_code_cache.max_count = 0;
      __pyx_code_cache.entries = NULL;
      for (i=0; i<count; i++) {
          Py_DECREF(entries[i].code_object);
      }
      PyMem_Free(entries);
  }

}
static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) {
  /*--- Global cleanup code ---*/
  Py_CLEAR(__pyx_v_8slepc4py_5SLEPc_PetscError);
  __Pyx_CleanupGlobals();
  /*--- Type import cleanup code ---*/
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_AO);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Comm);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_DM);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_IS);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_KSP);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_LGMap);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Mat);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_NullSpace);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Object);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_PC);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Partitioner);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Random);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_SF);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_SNES);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Scatter);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Section);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_TAO);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_TS);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Vec);
  Py_CLEAR(__pyx_ptype_8petsc4py_5PETSc_Viewer);
  /*--- Builtin cleanup code ---*/
  Py_CLEAR(__pyx_builtin_object);
  Py_CLEAR(__pyx_builtin_MemoryError);
  Py_CLEAR(__pyx_builtin_TypeError);
  Py_CLEAR(__pyx_builtin_ValueError);
  Py_CLEAR(__pyx_builtin_range);
  /*--- Intern cleanup code ---*/
  Py_CLEAR(__pyx_empty_tuple);
  #if CYTHON_COMPILING_IN_PYPY
  Py_CLEAR(__pyx_b);
  #endif
  Py_CLEAR(__pyx_d);
}

/* --- 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

/* 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;
}

/* decode_c_bytes */
static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
         const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    if (unlikely((start < 0) | (stop < 0))) {
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (stop > length)
        stop = length;
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* 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

/* 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) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    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) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_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

/* 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);
}

/* KeywordStringCheck */
    static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
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
    return 0;
}

/* PyErrFetchRestore */
    #if CYTHON_COMPILING_IN_CPYTHON
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

/* WriteUnraisableException */
    static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#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_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || 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;
}

/* SaveResetException */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    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;
    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;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* PyErrExceptionMatches */
    #if CYTHON_COMPILING_IN_CPYTHON
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;
    return PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetException */
    #if CYTHON_COMPILING_IN_CPYTHON
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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
    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_COMPILING_IN_CPYTHON
    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;
    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;
}

/* 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 PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        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 = PyThreadState_GET();
        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

/* GetItemInt */
        static CYTHON_INLINE 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_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, 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_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, 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_COMPILING_IN_CPYTHON
    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));
}

/* 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;
}

/* PyObjectCallMethod1 */
        static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(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;
}

/* ArgTypeTest */
        static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

/* ExtTypeTest */
        static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* GetModuleGlobalName */
        static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* CallNextTpDealloc */
          static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_dealloc != current_tp_dealloc)
        type = type->tp_base;
    while (type && type->tp_dealloc == current_tp_dealloc)
        type = type->tp_base;
    if (type)
        type->tp_dealloc(obj);
}

/* CallNextTpTraverse */
          static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
          static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* GetVTable */
          static void* __Pyx_GetVtable(PyObject *dict) {
    void* ptr;
    PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
    if (!ob)
        goto bad;
#if PY_VERSION_HEX >= 0x02070000
    ptr = PyCapsule_GetPointer(ob, 0);
#else
    ptr = PyCObject_AsVoidPtr(ob);
#endif
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* SetVTable */
          static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* 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_VERSION_HEX < 0x03030000
    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, '.')) {
                #if PY_VERSION_HEX < 0x03030000
                PyObject *py_level = PyInt_FromLong(1);
                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, 1);
                #endif
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_VERSION_HEX < 0x03030000
            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_VERSION_HEX < 0x03030000
    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;
}

/* GetNameInClass */
          static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result)
        result = __Pyx_GetModuleGlobalName(name);
    return result;
}

/* 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;
}

/* ModuleImport */
          #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

/* RegisterModuleCleanup */
          #if PY_MAJOR_VERSION < 3
static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) {
    __pyx_module_cleanup(module);
    Py_INCREF(Py_None); return Py_None;
}
static int __Pyx_RegisterCleanup(void) {
    static PyMethodDef cleanup_def = {
        "__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0};
    PyObject *cleanup_func = 0;
    PyObject *atexit = 0;
    PyObject *reg = 0;
    PyObject *args = 0;
    PyObject *res = 0;
    int ret = -1;
    cleanup_func = PyCFunction_New(&cleanup_def, 0);
    if (!cleanup_func)
        goto bad;
    atexit = __Pyx_ImportModule("atexit");
    if (!atexit)
        goto bad;
    reg = PyObject_GetAttrString(atexit, "_exithandlers");
    if (reg && PyList_Check(reg)) {
        PyObject *a, *kw;
        a = PyTuple_New(0);
        kw = PyDict_New();
        if (!a || !kw) {
            Py_XDECREF(a);
            Py_XDECREF(kw);
            goto bad;
        }
        args = PyTuple_Pack(3, cleanup_func, a, kw);
        Py_DECREF(a);
        Py_DECREF(kw);
        if (!args)
            goto bad;
        ret = PyList_Insert(reg, 0, args);
    } else {
        if (!reg)
            PyErr_Clear();
        Py_XDECREF(reg);
        reg = PyObject_GetAttrString(atexit, "register");
        if (!reg)
            goto bad;
        args = PyTuple_Pack(1, cleanup_func);
        if (!args)
            goto bad;
        res = PyObject_CallObject(reg, args);
        if (!res)
            goto bad;
        ret = 0;
    }
bad:
    Py_XDECREF(cleanup_func);
    Py_XDECREF(atexit);
    Py_XDECREF(reg);
    Py_XDECREF(args);
    Py_XDECREF(res);
    return ret;
}
#else
static int __Pyx_RegisterCleanup(void) {
    if (0) __Pyx_ImportModule(NULL);
    return 0;
}
#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;
    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(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_STMatMode(STMatMode value) {
    const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(STMatMode) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(STMatMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(STMatMode) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(STMatMode),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogType(BVOrthogType value) {
    const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(BVOrthogType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(BVOrthogType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(BVOrthogType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogRefineType(BVOrthogRefineType value) {
    const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(BVOrthogRefineType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(BVOrthogRefineType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(BVOrthogRefineType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_BVOrthogBlockType(BVOrthogBlockType value) {
    const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(BVOrthogBlockType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(BVOrthogBlockType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(BVOrthogBlockType),
                                     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;\
    }

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSStateType(DSStateType value) {
    const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DSStateType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DSStateType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(DSStateType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(DSStateType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_DSMatType(DSMatType value) {
    const DSMatType neg_one = (DSMatType) -1, const_zero = (DSMatType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(DSMatType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DSMatType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(DSMatType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(DSMatType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(DSMatType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(DSMatType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FNCombineType(FNCombineType value) {
    const FNCombineType neg_one = (FNCombineType) -1, const_zero = (FNCombineType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(FNCombineType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(FNCombineType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(FNCombineType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(FNCombineType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(FNCombineType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(FNCombineType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSProblemType(EPSProblemType value) {
    const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSProblemType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSProblemType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSProblemType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSProblemType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSExtraction(EPSExtraction value) {
    const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSExtraction) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSExtraction) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSExtraction) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSExtraction),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSBalance(EPSBalance value) {
    const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSBalance) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSBalance) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSBalance) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSBalance),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSErrorType(EPSErrorType value) {
    const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSErrorType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSErrorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSErrorType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSErrorType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSWhich(EPSWhich value) {
    const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSWhich) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSWhich) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSWhich) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSWhich),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConv(EPSConv value) {
    const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSConv) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSConv) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSConv) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSConv),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSConvergedReason(EPSConvergedReason value) {
    const EPSConvergedReason neg_one = (EPSConvergedReason) -1, const_zero = (EPSConvergedReason) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSConvergedReason) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSConvergedReason) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSConvergedReason) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSConvergedReason),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSPowerShiftType(EPSPowerShiftType value) {
    const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSPowerShiftType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSPowerShiftType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSPowerShiftType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_EPSLanczosReorthogType(EPSLanczosReorthogType value) {
    const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(EPSLanczosReorthogType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(EPSLanczosReorthogType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(EPSLanczosReorthogType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDErrorType(SVDErrorType value) {
    const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SVDErrorType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDErrorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(SVDErrorType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SVDErrorType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDWhich(SVDWhich value) {
    const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SVDWhich) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDWhich) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(SVDWhich) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SVDWhich),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SVDConvergedReason(SVDConvergedReason value) {
    const SVDConvergedReason neg_one = (SVDConvergedReason) -1, const_zero = (SVDConvergedReason) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SVDConvergedReason) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDConvergedReason) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(SVDConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(SVDConvergedReason) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SVDConvergedReason) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(SVDConvergedReason),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPProblemType(PEPProblemType value) {
    const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPProblemType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPProblemType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPProblemType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPProblemType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPWhich(PEPWhich value) {
    const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPWhich) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPWhich) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPWhich) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPWhich),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPBasis(PEPBasis value) {
    const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPBasis) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPBasis) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPBasis) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPBasis),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPScale(PEPScale value) {
    const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPScale) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPScale) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPScale) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPScale),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefine(PEPRefine value) {
    const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPRefine) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPRefine) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPRefine) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPRefine),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPRefineScheme(PEPRefineScheme value) {
    const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPRefineScheme) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPRefineScheme) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPRefineScheme),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPExtract(PEPExtract value) {
    const PEPExtract neg_one = (PEPExtract) -1, const_zero = (PEPExtract) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPExtract) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPExtract) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPExtract) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPExtract) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPExtract) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPExtract),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPErrorType(PEPErrorType value) {
    const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPErrorType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPErrorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPErrorType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPErrorType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConv(PEPConv value) {
    const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPConv) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPConv) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPConv) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPConv),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PEPConvergedReason(PEPConvergedReason value) {
    const PEPConvergedReason neg_one = (PEPConvergedReason) -1, const_zero = (PEPConvergedReason) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PEPConvergedReason) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPConvergedReason) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PEPConvergedReason) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PEPConvergedReason) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PEPConvergedReason),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPErrorType(NEPErrorType value) {
    const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NEPErrorType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPErrorType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(NEPErrorType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NEPErrorType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPWhich(NEPWhich value) {
    const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NEPWhich) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPWhich) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(NEPWhich) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NEPWhich),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPConvergedReason(NEPConvergedReason value) {
    const NEPConvergedReason neg_one = (NEPConvergedReason) -1, const_zero = (NEPConvergedReason) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NEPConvergedReason) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPConvergedReason) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(NEPConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(NEPConvergedReason) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPConvergedReason) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NEPConvergedReason),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefine(NEPRefine value) {
    const NEPRefine neg_one = (NEPRefine) -1, const_zero = (NEPRefine) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NEPRefine) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPRefine) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(NEPRefine) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(NEPRefine) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPRefine) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NEPRefine),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_NEPRefineScheme(NEPRefineScheme value) {
    const NEPRefineScheme neg_one = (NEPRefineScheme) -1, const_zero = (NEPRefineScheme) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(NEPRefineScheme) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPRefineScheme) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(NEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(NEPRefineScheme) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(NEPRefineScheme) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(NEPRefineScheme),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MFNConvergedReason(MFNConvergedReason value) {
    const MFNConvergedReason neg_one = (MFNConvergedReason) -1, const_zero = (MFNConvergedReason) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(MFNConvergedReason) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(MFNConvergedReason) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(MFNConvergedReason) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(MFNConvergedReason) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(MFNConvergedReason) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(MFNConvergedReason),
                                     little, !is_unsigned);
    }
}

/* 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);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscInt(PetscInt value) {
    const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PetscInt) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PetscInt) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PetscInt) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PetscInt),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
          static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PetscBool(PetscBool value) {
    const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PetscBool) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PetscBool) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(PetscBool) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(PetscBool),
                                     little, !is_unsigned);
    }
}

/* ClassMethod */
          static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
    static PyTypeObject *methoddescr_type = NULL;
    if (methoddescr_type == NULL) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (!meth) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    if (PyObject_TypeCheck(method, methoddescr_type)) {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else if (PyCFunction_Check(method)) {
        return PyClassMethod_New(method);
    }
#ifdef __Pyx_CyFunction_USED
    else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) {
        return PyClassMethod_New(method);
    }
#endif
    PyErr_SetString(PyExc_TypeError,
                   "Class-level classmethod() can only be called on "
                   "a method_descriptor or instance method.");
    return NULL;
}

/* 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))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } 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))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#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;
}

/* CIntFromPy */
          static CYTHON_INLINE PetscInt __Pyx_PyInt_As_PetscInt(PyObject *x) {
    const PetscInt neg_one = (PetscInt) -1, const_zero = (PetscInt) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PetscInt) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PetscInt, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PetscInt) 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 (PetscInt) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PetscInt, digit, digits[0])
                case 2:
                    if (8 * sizeof(PetscInt) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) >= 2 * PyLong_SHIFT) {
                            return (PetscInt) (((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PetscInt) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) >= 3 * PyLong_SHIFT) {
                            return (PetscInt) (((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PetscInt) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, 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(PetscInt) >= 4 * PyLong_SHIFT) {
                            return (PetscInt) (((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)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 (PetscInt) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PetscInt) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscInt, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PetscInt) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscInt, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PetscInt) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PetscInt, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PetscInt,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PetscInt) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) {
                            return (PetscInt) (((PetscInt)-1)*(((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PetscInt) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) {
                            return (PetscInt) ((((((PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PetscInt) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) {
                            return (PetscInt) (((PetscInt)-1)*(((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PetscInt) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) {
                            return (PetscInt) ((((((((PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PetscInt) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, 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(PetscInt) - 1 > 4 * PyLong_SHIFT) {
                            return (PetscInt) (((PetscInt)-1)*(((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PetscInt) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscInt, 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(PetscInt) - 1 > 4 * PyLong_SHIFT) {
                            return (PetscInt) ((((((((((PetscInt)digits[3]) << PyLong_SHIFT) | (PetscInt)digits[2]) << PyLong_SHIFT) | (PetscInt)digits[1]) << PyLong_SHIFT) | (PetscInt)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PetscInt) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscInt, long, PyLong_AsLong(x))
            } else if (sizeof(PetscInt) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscInt, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PetscInt 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 (PetscInt) -1;
        }
    } else {
        PetscInt val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PetscInt) -1;
        val = __Pyx_PyInt_As_PetscInt(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PetscInt");
    return (PetscInt) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PetscInt");
    return (PetscInt) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE MatStructure __Pyx_PyInt_As_MatStructure(PyObject *x) {
    const MatStructure neg_one = (MatStructure) -1, const_zero = (MatStructure) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(MatStructure) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(MatStructure, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (MatStructure) 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 (MatStructure) 0;
                case  1: __PYX_VERIFY_RETURN_INT(MatStructure, digit, digits[0])
                case 2:
                    if (8 * sizeof(MatStructure) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) >= 2 * PyLong_SHIFT) {
                            return (MatStructure) (((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(MatStructure) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) >= 3 * PyLong_SHIFT) {
                            return (MatStructure) (((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(MatStructure) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, 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(MatStructure) >= 4 * PyLong_SHIFT) {
                            return (MatStructure) (((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)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 (MatStructure) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(MatStructure) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(MatStructure, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(MatStructure) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(MatStructure, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (MatStructure) 0;
                case -1: __PYX_VERIFY_RETURN_INT(MatStructure, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(MatStructure,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(MatStructure) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) {
                            return (MatStructure) (((MatStructure)-1)*(((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(MatStructure) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) {
                            return (MatStructure) ((((((MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(MatStructure) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) {
                            return (MatStructure) (((MatStructure)-1)*(((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(MatStructure) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) {
                            return (MatStructure) ((((((((MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(MatStructure) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, 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(MatStructure) - 1 > 4 * PyLong_SHIFT) {
                            return (MatStructure) (((MatStructure)-1)*(((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(MatStructure) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(MatStructure, 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(MatStructure) - 1 > 4 * PyLong_SHIFT) {
                            return (MatStructure) ((((((((((MatStructure)digits[3]) << PyLong_SHIFT) | (MatStructure)digits[2]) << PyLong_SHIFT) | (MatStructure)digits[1]) << PyLong_SHIFT) | (MatStructure)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(MatStructure) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(MatStructure, long, PyLong_AsLong(x))
            } else if (sizeof(MatStructure) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(MatStructure, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            MatStructure 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 (MatStructure) -1;
        }
    } else {
        MatStructure val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (MatStructure) -1;
        val = __Pyx_PyInt_As_MatStructure(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to MatStructure");
    return (MatStructure) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to MatStructure");
    return (MatStructure) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PetscBool __Pyx_PyInt_As_PetscBool(PyObject *x) {
    const PetscBool neg_one = (PetscBool) -1, const_zero = (PetscBool) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PetscBool) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PetscBool, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PetscBool) 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 (PetscBool) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PetscBool, digit, digits[0])
                case 2:
                    if (8 * sizeof(PetscBool) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) >= 2 * PyLong_SHIFT) {
                            return (PetscBool) (((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PetscBool) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) >= 3 * PyLong_SHIFT) {
                            return (PetscBool) (((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PetscBool) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, 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(PetscBool) >= 4 * PyLong_SHIFT) {
                            return (PetscBool) (((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)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 (PetscBool) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PetscBool) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscBool, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PetscBool) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscBool, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PetscBool) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PetscBool, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PetscBool,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PetscBool) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) {
                            return (PetscBool) (((PetscBool)-1)*(((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PetscBool) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) {
                            return (PetscBool) ((((((PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PetscBool) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) {
                            return (PetscBool) (((PetscBool)-1)*(((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PetscBool) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) {
                            return (PetscBool) ((((((((PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PetscBool) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, 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(PetscBool) - 1 > 4 * PyLong_SHIFT) {
                            return (PetscBool) (((PetscBool)-1)*(((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PetscBool) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PetscBool, 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(PetscBool) - 1 > 4 * PyLong_SHIFT) {
                            return (PetscBool) ((((((((((PetscBool)digits[3]) << PyLong_SHIFT) | (PetscBool)digits[2]) << PyLong_SHIFT) | (PetscBool)digits[1]) << PyLong_SHIFT) | (PetscBool)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PetscBool) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscBool, long, PyLong_AsLong(x))
            } else if (sizeof(PetscBool) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PetscBool, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PetscBool 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 (PetscBool) -1;
        }
    } else {
        PetscBool val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PetscBool) -1;
        val = __Pyx_PyInt_As_PetscBool(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PetscBool");
    return (PetscBool) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PetscBool");
    return (PetscBool) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE STMatMode __Pyx_PyInt_As_STMatMode(PyObject *x) {
    const STMatMode neg_one = (STMatMode) -1, const_zero = (STMatMode) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(STMatMode) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(STMatMode, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (STMatMode) 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 (STMatMode) 0;
                case  1: __PYX_VERIFY_RETURN_INT(STMatMode, digit, digits[0])
                case 2:
                    if (8 * sizeof(STMatMode) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) >= 2 * PyLong_SHIFT) {
                            return (STMatMode) (((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(STMatMode) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) >= 3 * PyLong_SHIFT) {
                            return (STMatMode) (((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(STMatMode) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, 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(STMatMode) >= 4 * PyLong_SHIFT) {
                            return (STMatMode) (((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)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 (STMatMode) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(STMatMode) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(STMatMode, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(STMatMode) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(STMatMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (STMatMode) 0;
                case -1: __PYX_VERIFY_RETURN_INT(STMatMode, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(STMatMode,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(STMatMode) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) {
                            return (STMatMode) (((STMatMode)-1)*(((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(STMatMode) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) {
                            return (STMatMode) ((((((STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(STMatMode) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) {
                            return (STMatMode) (((STMatMode)-1)*(((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(STMatMode) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) {
                            return (STMatMode) ((((((((STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(STMatMode) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, 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(STMatMode) - 1 > 4 * PyLong_SHIFT) {
                            return (STMatMode) (((STMatMode)-1)*(((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(STMatMode) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(STMatMode, 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(STMatMode) - 1 > 4 * PyLong_SHIFT) {
                            return (STMatMode) ((((((((((STMatMode)digits[3]) << PyLong_SHIFT) | (STMatMode)digits[2]) << PyLong_SHIFT) | (STMatMode)digits[1]) << PyLong_SHIFT) | (STMatMode)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(STMatMode) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(STMatMode, long, PyLong_AsLong(x))
            } else if (sizeof(STMatMode) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(STMatMode, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            STMatMode 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 (STMatMode) -1;
        }
    } else {
        STMatMode val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (STMatMode) -1;
        val = __Pyx_PyInt_As_STMatMode(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to STMatMode");
    return (STMatMode) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to STMatMode");
    return (STMatMode) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE BVOrthogType __Pyx_PyInt_As_BVOrthogType(PyObject *x) {
    const BVOrthogType neg_one = (BVOrthogType) -1, const_zero = (BVOrthogType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(BVOrthogType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(BVOrthogType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (BVOrthogType) 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 (BVOrthogType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogType, digit, digits[0])
                case 2:
                    if (8 * sizeof(BVOrthogType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) >= 2 * PyLong_SHIFT) {
                            return (BVOrthogType) (((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) >= 3 * PyLong_SHIFT) {
                            return (BVOrthogType) (((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, 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(BVOrthogType) >= 4 * PyLong_SHIFT) {
                            return (BVOrthogType) (((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)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 (BVOrthogType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(BVOrthogType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(BVOrthogType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (BVOrthogType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(BVOrthogType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(BVOrthogType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogType) (((BVOrthogType)-1)*(((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(BVOrthogType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogType) ((((((BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(BVOrthogType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogType) (((BVOrthogType)-1)*(((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogType) ((((((((BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(BVOrthogType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, 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(BVOrthogType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogType) (((BVOrthogType)-1)*(((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogType, 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(BVOrthogType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogType) ((((((((((BVOrthogType)digits[3]) << PyLong_SHIFT) | (BVOrthogType)digits[2]) << PyLong_SHIFT) | (BVOrthogType)digits[1]) << PyLong_SHIFT) | (BVOrthogType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(BVOrthogType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, long, PyLong_AsLong(x))
            } else if (sizeof(BVOrthogType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            BVOrthogType 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 (BVOrthogType) -1;
        }
    } else {
        BVOrthogType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (BVOrthogType) -1;
        val = __Pyx_PyInt_As_BVOrthogType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to BVOrthogType");
    return (BVOrthogType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to BVOrthogType");
    return (BVOrthogType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE BVOrthogRefineType __Pyx_PyInt_As_BVOrthogRefineType(PyObject *x) {
    const BVOrthogRefineType neg_one = (BVOrthogRefineType) -1, const_zero = (BVOrthogRefineType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(BVOrthogRefineType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (BVOrthogRefineType) 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 (BVOrthogRefineType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, digit, digits[0])
                case 2:
                    if (8 * sizeof(BVOrthogRefineType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) >= 2 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogRefineType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) >= 3 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogRefineType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, 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(BVOrthogRefineType) >= 4 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)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 (BVOrthogRefineType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(BVOrthogRefineType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(BVOrthogRefineType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (BVOrthogRefineType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogRefineType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(BVOrthogRefineType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(BVOrthogRefineType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) ((((((BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(BVOrthogRefineType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogRefineType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) ((((((((BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(BVOrthogRefineType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, 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(BVOrthogRefineType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) (((BVOrthogRefineType)-1)*(((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogRefineType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogRefineType, 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(BVOrthogRefineType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogRefineType) ((((((((((BVOrthogRefineType)digits[3]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[2]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[1]) << PyLong_SHIFT) | (BVOrthogRefineType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(BVOrthogRefineType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, long, PyLong_AsLong(x))
            } else if (sizeof(BVOrthogRefineType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogRefineType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            BVOrthogRefineType 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 (BVOrthogRefineType) -1;
        }
    } else {
        BVOrthogRefineType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (BVOrthogRefineType) -1;
        val = __Pyx_PyInt_As_BVOrthogRefineType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to BVOrthogRefineType");
    return (BVOrthogRefineType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to BVOrthogRefineType");
    return (BVOrthogRefineType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE BVOrthogBlockType __Pyx_PyInt_As_BVOrthogBlockType(PyObject *x) {
    const BVOrthogBlockType neg_one = (BVOrthogBlockType) -1, const_zero = (BVOrthogBlockType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(BVOrthogBlockType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (BVOrthogBlockType) 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 (BVOrthogBlockType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, digit, digits[0])
                case 2:
                    if (8 * sizeof(BVOrthogBlockType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) >= 2 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogBlockType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) >= 3 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogBlockType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, 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(BVOrthogBlockType) >= 4 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)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 (BVOrthogBlockType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(BVOrthogBlockType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(BVOrthogBlockType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (BVOrthogBlockType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(BVOrthogBlockType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(BVOrthogBlockType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(BVOrthogBlockType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) ((((((BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(BVOrthogBlockType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(BVOrthogBlockType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) ((((((((BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(BVOrthogBlockType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, 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(BVOrthogBlockType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) (((BVOrthogBlockType)-1)*(((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(BVOrthogBlockType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(BVOrthogBlockType, 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(BVOrthogBlockType) - 1 > 4 * PyLong_SHIFT) {
                            return (BVOrthogBlockType) ((((((((((BVOrthogBlockType)digits[3]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[2]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[1]) << PyLong_SHIFT) | (BVOrthogBlockType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(BVOrthogBlockType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, long, PyLong_AsLong(x))
            } else if (sizeof(BVOrthogBlockType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(BVOrthogBlockType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            BVOrthogBlockType 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 (BVOrthogBlockType) -1;
        }
    } else {
        BVOrthogBlockType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (BVOrthogBlockType) -1;
        val = __Pyx_PyInt_As_BVOrthogBlockType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to BVOrthogBlockType");
    return (BVOrthogBlockType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to BVOrthogBlockType");
    return (BVOrthogBlockType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) 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 (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_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
#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 (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((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(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, 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(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_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
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t 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 (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE NormType __Pyx_PyInt_As_NormType(PyObject *x) {
    const NormType neg_one = (NormType) -1, const_zero = (NormType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(NormType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(NormType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (NormType) 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 (NormType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(NormType, digit, digits[0])
                case 2:
                    if (8 * sizeof(NormType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) >= 2 * PyLong_SHIFT) {
                            return (NormType) (((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NormType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) >= 3 * PyLong_SHIFT) {
                            return (NormType) (((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NormType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, 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(NormType) >= 4 * PyLong_SHIFT) {
                            return (NormType) (((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)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 (NormType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(NormType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NormType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(NormType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NormType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (NormType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(NormType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(NormType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(NormType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) {
                            return (NormType) (((NormType)-1)*(((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(NormType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) {
                            return (NormType) ((((((NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(NormType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) {
                            return (NormType) (((NormType)-1)*(((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NormType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) {
                            return (NormType) ((((((((NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(NormType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, 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(NormType) - 1 > 4 * PyLong_SHIFT) {
                            return (NormType) (((NormType)-1)*(((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NormType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NormType, 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(NormType) - 1 > 4 * PyLong_SHIFT) {
                            return (NormType) ((((((((((NormType)digits[3]) << PyLong_SHIFT) | (NormType)digits[2]) << PyLong_SHIFT) | (NormType)digits[1]) << PyLong_SHIFT) | (NormType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(NormType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NormType, long, PyLong_AsLong(x))
            } else if (sizeof(NormType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NormType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            NormType 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 (NormType) -1;
        }
    } else {
        NormType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (NormType) -1;
        val = __Pyx_PyInt_As_NormType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to NormType");
    return (NormType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to NormType");
    return (NormType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE DSStateType __Pyx_PyInt_As_DSStateType(PyObject *x) {
    const DSStateType neg_one = (DSStateType) -1, const_zero = (DSStateType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(DSStateType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(DSStateType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (DSStateType) 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 (DSStateType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(DSStateType, digit, digits[0])
                case 2:
                    if (8 * sizeof(DSStateType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) >= 2 * PyLong_SHIFT) {
                            return (DSStateType) (((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(DSStateType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) >= 3 * PyLong_SHIFT) {
                            return (DSStateType) (((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(DSStateType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, 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(DSStateType) >= 4 * PyLong_SHIFT) {
                            return (DSStateType) (((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)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 (DSStateType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(DSStateType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(DSStateType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(DSStateType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(DSStateType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (DSStateType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(DSStateType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(DSStateType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(DSStateType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) {
                            return (DSStateType) (((DSStateType)-1)*(((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(DSStateType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) {
                            return (DSStateType) ((((((DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(DSStateType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) {
                            return (DSStateType) (((DSStateType)-1)*(((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(DSStateType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) {
                            return (DSStateType) ((((((((DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(DSStateType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, 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(DSStateType) - 1 > 4 * PyLong_SHIFT) {
                            return (DSStateType) (((DSStateType)-1)*(((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(DSStateType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(DSStateType, 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(DSStateType) - 1 > 4 * PyLong_SHIFT) {
                            return (DSStateType) ((((((((((DSStateType)digits[3]) << PyLong_SHIFT) | (DSStateType)digits[2]) << PyLong_SHIFT) | (DSStateType)digits[1]) << PyLong_SHIFT) | (DSStateType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(DSStateType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(DSStateType, long, PyLong_AsLong(x))
            } else if (sizeof(DSStateType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(DSStateType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            DSStateType 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 (DSStateType) -1;
        }
    } else {
        DSStateType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (DSStateType) -1;
        val = __Pyx_PyInt_As_DSStateType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to DSStateType");
    return (DSStateType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to DSStateType");
    return (DSStateType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSProblemType __Pyx_PyInt_As_EPSProblemType(PyObject *x) {
    const EPSProblemType neg_one = (EPSProblemType) -1, const_zero = (EPSProblemType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSProblemType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSProblemType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSProblemType) 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 (EPSProblemType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSProblemType, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSProblemType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) >= 2 * PyLong_SHIFT) {
                            return (EPSProblemType) (((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSProblemType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) >= 3 * PyLong_SHIFT) {
                            return (EPSProblemType) (((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSProblemType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, 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(EPSProblemType) >= 4 * PyLong_SHIFT) {
                            return (EPSProblemType) (((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)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 (EPSProblemType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSProblemType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSProblemType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSProblemType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSProblemType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSProblemType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSProblemType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSProblemType) (((EPSProblemType)-1)*(((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSProblemType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSProblemType) ((((((EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSProblemType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSProblemType) (((EPSProblemType)-1)*(((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSProblemType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSProblemType) ((((((((EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSProblemType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, 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(EPSProblemType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSProblemType) (((EPSProblemType)-1)*(((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSProblemType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSProblemType, 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(EPSProblemType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSProblemType) ((((((((((EPSProblemType)digits[3]) << PyLong_SHIFT) | (EPSProblemType)digits[2]) << PyLong_SHIFT) | (EPSProblemType)digits[1]) << PyLong_SHIFT) | (EPSProblemType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSProblemType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, long, PyLong_AsLong(x))
            } else if (sizeof(EPSProblemType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSProblemType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSProblemType 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 (EPSProblemType) -1;
        }
    } else {
        EPSProblemType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSProblemType) -1;
        val = __Pyx_PyInt_As_EPSProblemType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSProblemType");
    return (EPSProblemType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSProblemType");
    return (EPSProblemType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSBalance __Pyx_PyInt_As_EPSBalance(PyObject *x) {
    const EPSBalance neg_one = (EPSBalance) -1, const_zero = (EPSBalance) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSBalance) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSBalance, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSBalance) 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 (EPSBalance) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSBalance, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSBalance) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) >= 2 * PyLong_SHIFT) {
                            return (EPSBalance) (((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSBalance) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) >= 3 * PyLong_SHIFT) {
                            return (EPSBalance) (((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSBalance) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, 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(EPSBalance) >= 4 * PyLong_SHIFT) {
                            return (EPSBalance) (((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)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 (EPSBalance) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSBalance) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSBalance) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSBalance) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSBalance, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSBalance,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSBalance) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSBalance) (((EPSBalance)-1)*(((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSBalance) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSBalance) ((((((EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSBalance) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSBalance) (((EPSBalance)-1)*(((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSBalance) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSBalance) ((((((((EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSBalance) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, 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(EPSBalance) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSBalance) (((EPSBalance)-1)*(((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSBalance) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSBalance, 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(EPSBalance) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSBalance) ((((((((((EPSBalance)digits[3]) << PyLong_SHIFT) | (EPSBalance)digits[2]) << PyLong_SHIFT) | (EPSBalance)digits[1]) << PyLong_SHIFT) | (EPSBalance)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSBalance) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, long, PyLong_AsLong(x))
            } else if (sizeof(EPSBalance) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSBalance, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSBalance 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 (EPSBalance) -1;
        }
    } else {
        EPSBalance val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSBalance) -1;
        val = __Pyx_PyInt_As_EPSBalance(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSBalance");
    return (EPSBalance) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSBalance");
    return (EPSBalance) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSExtraction __Pyx_PyInt_As_EPSExtraction(PyObject *x) {
    const EPSExtraction neg_one = (EPSExtraction) -1, const_zero = (EPSExtraction) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSExtraction) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSExtraction, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSExtraction) 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 (EPSExtraction) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSExtraction, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSExtraction) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) >= 2 * PyLong_SHIFT) {
                            return (EPSExtraction) (((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSExtraction) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) >= 3 * PyLong_SHIFT) {
                            return (EPSExtraction) (((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSExtraction) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, 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(EPSExtraction) >= 4 * PyLong_SHIFT) {
                            return (EPSExtraction) (((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)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 (EPSExtraction) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSExtraction) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSExtraction) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSExtraction) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSExtraction, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSExtraction,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSExtraction) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSExtraction) (((EPSExtraction)-1)*(((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSExtraction) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSExtraction) ((((((EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSExtraction) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSExtraction) (((EPSExtraction)-1)*(((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSExtraction) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSExtraction) ((((((((EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSExtraction) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, 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(EPSExtraction) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSExtraction) (((EPSExtraction)-1)*(((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSExtraction) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSExtraction, 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(EPSExtraction) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSExtraction) ((((((((((EPSExtraction)digits[3]) << PyLong_SHIFT) | (EPSExtraction)digits[2]) << PyLong_SHIFT) | (EPSExtraction)digits[1]) << PyLong_SHIFT) | (EPSExtraction)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSExtraction) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, long, PyLong_AsLong(x))
            } else if (sizeof(EPSExtraction) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSExtraction, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSExtraction 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 (EPSExtraction) -1;
        }
    } else {
        EPSExtraction val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSExtraction) -1;
        val = __Pyx_PyInt_As_EPSExtraction(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSExtraction");
    return (EPSExtraction) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSExtraction");
    return (EPSExtraction) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSWhich __Pyx_PyInt_As_EPSWhich(PyObject *x) {
    const EPSWhich neg_one = (EPSWhich) -1, const_zero = (EPSWhich) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSWhich) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSWhich, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSWhich) 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 (EPSWhich) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSWhich, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) >= 2 * PyLong_SHIFT) {
                            return (EPSWhich) (((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) >= 3 * PyLong_SHIFT) {
                            return (EPSWhich) (((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, 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(EPSWhich) >= 4 * PyLong_SHIFT) {
                            return (EPSWhich) (((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)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 (EPSWhich) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSWhich) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSWhich) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSWhich) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSWhich, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSWhich,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSWhich) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSWhich) (((EPSWhich)-1)*(((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSWhich) ((((((EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSWhich) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSWhich) (((EPSWhich)-1)*(((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSWhich) ((((((((EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSWhich) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, 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(EPSWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSWhich) (((EPSWhich)-1)*(((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSWhich, 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(EPSWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSWhich) ((((((((((EPSWhich)digits[3]) << PyLong_SHIFT) | (EPSWhich)digits[2]) << PyLong_SHIFT) | (EPSWhich)digits[1]) << PyLong_SHIFT) | (EPSWhich)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSWhich) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, long, PyLong_AsLong(x))
            } else if (sizeof(EPSWhich) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSWhich, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSWhich 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 (EPSWhich) -1;
        }
    } else {
        EPSWhich val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSWhich) -1;
        val = __Pyx_PyInt_As_EPSWhich(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSWhich");
    return (EPSWhich) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSWhich");
    return (EPSWhich) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSConv __Pyx_PyInt_As_EPSConv(PyObject *x) {
    const EPSConv neg_one = (EPSConv) -1, const_zero = (EPSConv) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSConv) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSConv, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSConv) 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 (EPSConv) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSConv, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSConv) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) >= 2 * PyLong_SHIFT) {
                            return (EPSConv) (((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSConv) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) >= 3 * PyLong_SHIFT) {
                            return (EPSConv) (((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSConv) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, 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(EPSConv) >= 4 * PyLong_SHIFT) {
                            return (EPSConv) (((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)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 (EPSConv) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSConv) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSConv, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSConv) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSConv) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSConv, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSConv,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSConv) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSConv) (((EPSConv)-1)*(((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSConv) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSConv) ((((((EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSConv) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSConv) (((EPSConv)-1)*(((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSConv) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSConv) ((((((((EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSConv) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, 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(EPSConv) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSConv) (((EPSConv)-1)*(((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSConv) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSConv, 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(EPSConv) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSConv) ((((((((((EPSConv)digits[3]) << PyLong_SHIFT) | (EPSConv)digits[2]) << PyLong_SHIFT) | (EPSConv)digits[1]) << PyLong_SHIFT) | (EPSConv)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSConv) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSConv, long, PyLong_AsLong(x))
            } else if (sizeof(EPSConv) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSConv, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSConv 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 (EPSConv) -1;
        }
    } else {
        EPSConv val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSConv) -1;
        val = __Pyx_PyInt_As_EPSConv(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSConv");
    return (EPSConv) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSConv");
    return (EPSConv) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSErrorType __Pyx_PyInt_As_EPSErrorType(PyObject *x) {
    const EPSErrorType neg_one = (EPSErrorType) -1, const_zero = (EPSErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSErrorType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSErrorType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSErrorType) 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 (EPSErrorType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSErrorType, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) >= 2 * PyLong_SHIFT) {
                            return (EPSErrorType) (((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) >= 3 * PyLong_SHIFT) {
                            return (EPSErrorType) (((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, 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(EPSErrorType) >= 4 * PyLong_SHIFT) {
                            return (EPSErrorType) (((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)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 (EPSErrorType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSErrorType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSErrorType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSErrorType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSErrorType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSErrorType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSErrorType) (((EPSErrorType)-1)*(((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSErrorType) ((((((EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSErrorType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSErrorType) (((EPSErrorType)-1)*(((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSErrorType) ((((((((EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSErrorType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, 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(EPSErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSErrorType) (((EPSErrorType)-1)*(((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSErrorType, 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(EPSErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSErrorType) ((((((((((EPSErrorType)digits[3]) << PyLong_SHIFT) | (EPSErrorType)digits[2]) << PyLong_SHIFT) | (EPSErrorType)digits[1]) << PyLong_SHIFT) | (EPSErrorType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSErrorType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, long, PyLong_AsLong(x))
            } else if (sizeof(EPSErrorType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSErrorType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSErrorType 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 (EPSErrorType) -1;
        }
    } else {
        EPSErrorType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSErrorType) -1;
        val = __Pyx_PyInt_As_EPSErrorType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSErrorType");
    return (EPSErrorType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSErrorType");
    return (EPSErrorType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSPowerShiftType __Pyx_PyInt_As_EPSPowerShiftType(PyObject *x) {
    const EPSPowerShiftType neg_one = (EPSPowerShiftType) -1, const_zero = (EPSPowerShiftType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSPowerShiftType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSPowerShiftType) 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 (EPSPowerShiftType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSPowerShiftType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) >= 2 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSPowerShiftType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) >= 3 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSPowerShiftType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, 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(EPSPowerShiftType) >= 4 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)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 (EPSPowerShiftType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSPowerShiftType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSPowerShiftType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSPowerShiftType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSPowerShiftType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSPowerShiftType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSPowerShiftType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) ((((((EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSPowerShiftType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSPowerShiftType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) ((((((((EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSPowerShiftType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, 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(EPSPowerShiftType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) (((EPSPowerShiftType)-1)*(((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSPowerShiftType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSPowerShiftType, 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(EPSPowerShiftType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSPowerShiftType) ((((((((((EPSPowerShiftType)digits[3]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[2]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[1]) << PyLong_SHIFT) | (EPSPowerShiftType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSPowerShiftType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, long, PyLong_AsLong(x))
            } else if (sizeof(EPSPowerShiftType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSPowerShiftType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSPowerShiftType 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 (EPSPowerShiftType) -1;
        }
    } else {
        EPSPowerShiftType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSPowerShiftType) -1;
        val = __Pyx_PyInt_As_EPSPowerShiftType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSPowerShiftType");
    return (EPSPowerShiftType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSPowerShiftType");
    return (EPSPowerShiftType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE EPSLanczosReorthogType __Pyx_PyInt_As_EPSLanczosReorthogType(PyObject *x) {
    const EPSLanczosReorthogType neg_one = (EPSLanczosReorthogType) -1, const_zero = (EPSLanczosReorthogType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(EPSLanczosReorthogType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (EPSLanczosReorthogType) 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 (EPSLanczosReorthogType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, digit, digits[0])
                case 2:
                    if (8 * sizeof(EPSLanczosReorthogType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) >= 2 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSLanczosReorthogType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) >= 3 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSLanczosReorthogType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, 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(EPSLanczosReorthogType) >= 4 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)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 (EPSLanczosReorthogType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(EPSLanczosReorthogType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (EPSLanczosReorthogType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(EPSLanczosReorthogType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(EPSLanczosReorthogType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) ((((((EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(EPSLanczosReorthogType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(EPSLanczosReorthogType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) ((((((((EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(EPSLanczosReorthogType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, 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(EPSLanczosReorthogType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) (((EPSLanczosReorthogType)-1)*(((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(EPSLanczosReorthogType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(EPSLanczosReorthogType, 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(EPSLanczosReorthogType) - 1 > 4 * PyLong_SHIFT) {
                            return (EPSLanczosReorthogType) ((((((((((EPSLanczosReorthogType)digits[3]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[2]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[1]) << PyLong_SHIFT) | (EPSLanczosReorthogType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(EPSLanczosReorthogType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, long, PyLong_AsLong(x))
            } else if (sizeof(EPSLanczosReorthogType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(EPSLanczosReorthogType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            EPSLanczosReorthogType 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 (EPSLanczosReorthogType) -1;
        }
    } else {
        EPSLanczosReorthogType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (EPSLanczosReorthogType) -1;
        val = __Pyx_PyInt_As_EPSLanczosReorthogType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to EPSLanczosReorthogType");
    return (EPSLanczosReorthogType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to EPSLanczosReorthogType");
    return (EPSLanczosReorthogType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE SVDWhich __Pyx_PyInt_As_SVDWhich(PyObject *x) {
    const SVDWhich neg_one = (SVDWhich) -1, const_zero = (SVDWhich) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(SVDWhich) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(SVDWhich, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (SVDWhich) 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 (SVDWhich) 0;
                case  1: __PYX_VERIFY_RETURN_INT(SVDWhich, digit, digits[0])
                case 2:
                    if (8 * sizeof(SVDWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) >= 2 * PyLong_SHIFT) {
                            return (SVDWhich) (((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(SVDWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) >= 3 * PyLong_SHIFT) {
                            return (SVDWhich) (((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(SVDWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, 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(SVDWhich) >= 4 * PyLong_SHIFT) {
                            return (SVDWhich) (((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)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 (SVDWhich) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(SVDWhich) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(SVDWhich) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (SVDWhich) 0;
                case -1: __PYX_VERIFY_RETURN_INT(SVDWhich, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(SVDWhich,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(SVDWhich) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (SVDWhich) (((SVDWhich)-1)*(((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(SVDWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (SVDWhich) ((((((SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(SVDWhich) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (SVDWhich) (((SVDWhich)-1)*(((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(SVDWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (SVDWhich) ((((((((SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(SVDWhich) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, 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(SVDWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (SVDWhich) (((SVDWhich)-1)*(((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(SVDWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDWhich, 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(SVDWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (SVDWhich) ((((((((((SVDWhich)digits[3]) << PyLong_SHIFT) | (SVDWhich)digits[2]) << PyLong_SHIFT) | (SVDWhich)digits[1]) << PyLong_SHIFT) | (SVDWhich)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(SVDWhich) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, long, PyLong_AsLong(x))
            } else if (sizeof(SVDWhich) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDWhich, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            SVDWhich 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 (SVDWhich) -1;
        }
    } else {
        SVDWhich val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (SVDWhich) -1;
        val = __Pyx_PyInt_As_SVDWhich(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to SVDWhich");
    return (SVDWhich) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to SVDWhich");
    return (SVDWhich) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE SVDErrorType __Pyx_PyInt_As_SVDErrorType(PyObject *x) {
    const SVDErrorType neg_one = (SVDErrorType) -1, const_zero = (SVDErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(SVDErrorType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(SVDErrorType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (SVDErrorType) 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 (SVDErrorType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(SVDErrorType, digit, digits[0])
                case 2:
                    if (8 * sizeof(SVDErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) >= 2 * PyLong_SHIFT) {
                            return (SVDErrorType) (((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(SVDErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) >= 3 * PyLong_SHIFT) {
                            return (SVDErrorType) (((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(SVDErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, 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(SVDErrorType) >= 4 * PyLong_SHIFT) {
                            return (SVDErrorType) (((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)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 (SVDErrorType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(SVDErrorType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(SVDErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (SVDErrorType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(SVDErrorType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(SVDErrorType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(SVDErrorType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (SVDErrorType) (((SVDErrorType)-1)*(((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(SVDErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (SVDErrorType) ((((((SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(SVDErrorType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (SVDErrorType) (((SVDErrorType)-1)*(((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(SVDErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (SVDErrorType) ((((((((SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(SVDErrorType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, 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(SVDErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (SVDErrorType) (((SVDErrorType)-1)*(((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(SVDErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(SVDErrorType, 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(SVDErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (SVDErrorType) ((((((((((SVDErrorType)digits[3]) << PyLong_SHIFT) | (SVDErrorType)digits[2]) << PyLong_SHIFT) | (SVDErrorType)digits[1]) << PyLong_SHIFT) | (SVDErrorType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(SVDErrorType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, long, PyLong_AsLong(x))
            } else if (sizeof(SVDErrorType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(SVDErrorType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            SVDErrorType 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 (SVDErrorType) -1;
        }
    } else {
        SVDErrorType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (SVDErrorType) -1;
        val = __Pyx_PyInt_As_SVDErrorType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to SVDErrorType");
    return (SVDErrorType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to SVDErrorType");
    return (SVDErrorType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPBasis __Pyx_PyInt_As_PEPBasis(PyObject *x) {
    const PEPBasis neg_one = (PEPBasis) -1, const_zero = (PEPBasis) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPBasis) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPBasis, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPBasis) 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 (PEPBasis) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPBasis, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPBasis) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) >= 2 * PyLong_SHIFT) {
                            return (PEPBasis) (((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPBasis) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) >= 3 * PyLong_SHIFT) {
                            return (PEPBasis) (((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPBasis) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, 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(PEPBasis) >= 4 * PyLong_SHIFT) {
                            return (PEPBasis) (((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)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 (PEPBasis) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPBasis) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPBasis) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPBasis) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPBasis, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPBasis,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPBasis) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPBasis) (((PEPBasis)-1)*(((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPBasis) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPBasis) ((((((PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPBasis) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPBasis) (((PEPBasis)-1)*(((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPBasis) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPBasis) ((((((((PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPBasis) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, 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(PEPBasis) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPBasis) (((PEPBasis)-1)*(((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPBasis) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPBasis, 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(PEPBasis) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPBasis) ((((((((((PEPBasis)digits[3]) << PyLong_SHIFT) | (PEPBasis)digits[2]) << PyLong_SHIFT) | (PEPBasis)digits[1]) << PyLong_SHIFT) | (PEPBasis)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPBasis) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, long, PyLong_AsLong(x))
            } else if (sizeof(PEPBasis) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPBasis, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPBasis 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 (PEPBasis) -1;
        }
    } else {
        PEPBasis val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPBasis) -1;
        val = __Pyx_PyInt_As_PEPBasis(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPBasis");
    return (PEPBasis) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPBasis");
    return (PEPBasis) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPProblemType __Pyx_PyInt_As_PEPProblemType(PyObject *x) {
    const PEPProblemType neg_one = (PEPProblemType) -1, const_zero = (PEPProblemType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPProblemType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPProblemType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPProblemType) 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 (PEPProblemType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPProblemType, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPProblemType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) >= 2 * PyLong_SHIFT) {
                            return (PEPProblemType) (((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPProblemType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) >= 3 * PyLong_SHIFT) {
                            return (PEPProblemType) (((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPProblemType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, 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(PEPProblemType) >= 4 * PyLong_SHIFT) {
                            return (PEPProblemType) (((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)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 (PEPProblemType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPProblemType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPProblemType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPProblemType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPProblemType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPProblemType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPProblemType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPProblemType) (((PEPProblemType)-1)*(((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPProblemType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPProblemType) ((((((PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPProblemType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPProblemType) (((PEPProblemType)-1)*(((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPProblemType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPProblemType) ((((((((PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPProblemType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, 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(PEPProblemType) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPProblemType) (((PEPProblemType)-1)*(((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPProblemType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPProblemType, 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(PEPProblemType) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPProblemType) ((((((((((PEPProblemType)digits[3]) << PyLong_SHIFT) | (PEPProblemType)digits[2]) << PyLong_SHIFT) | (PEPProblemType)digits[1]) << PyLong_SHIFT) | (PEPProblemType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPProblemType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, long, PyLong_AsLong(x))
            } else if (sizeof(PEPProblemType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPProblemType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPProblemType 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 (PEPProblemType) -1;
        }
    } else {
        PEPProblemType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPProblemType) -1;
        val = __Pyx_PyInt_As_PEPProblemType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPProblemType");
    return (PEPProblemType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPProblemType");
    return (PEPProblemType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPWhich __Pyx_PyInt_As_PEPWhich(PyObject *x) {
    const PEPWhich neg_one = (PEPWhich) -1, const_zero = (PEPWhich) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPWhich) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPWhich, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPWhich) 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 (PEPWhich) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPWhich, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) >= 2 * PyLong_SHIFT) {
                            return (PEPWhich) (((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) >= 3 * PyLong_SHIFT) {
                            return (PEPWhich) (((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, 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(PEPWhich) >= 4 * PyLong_SHIFT) {
                            return (PEPWhich) (((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)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 (PEPWhich) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPWhich) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPWhich) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPWhich) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPWhich, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPWhich,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPWhich) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPWhich) (((PEPWhich)-1)*(((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPWhich) ((((((PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPWhich) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPWhich) (((PEPWhich)-1)*(((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPWhich) ((((((((PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPWhich) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, 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(PEPWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPWhich) (((PEPWhich)-1)*(((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPWhich, 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(PEPWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPWhich) ((((((((((PEPWhich)digits[3]) << PyLong_SHIFT) | (PEPWhich)digits[2]) << PyLong_SHIFT) | (PEPWhich)digits[1]) << PyLong_SHIFT) | (PEPWhich)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPWhich) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, long, PyLong_AsLong(x))
            } else if (sizeof(PEPWhich) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPWhich 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 (PEPWhich) -1;
        }
    } else {
        PEPWhich val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPWhich) -1;
        val = __Pyx_PyInt_As_PEPWhich(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPWhich");
    return (PEPWhich) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPWhich");
    return (PEPWhich) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPConv __Pyx_PyInt_As_PEPConv(PyObject *x) {
    const PEPConv neg_one = (PEPConv) -1, const_zero = (PEPConv) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPConv) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPConv, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPConv) 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 (PEPConv) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPConv, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPConv) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) >= 2 * PyLong_SHIFT) {
                            return (PEPConv) (((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPConv) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) >= 3 * PyLong_SHIFT) {
                            return (PEPConv) (((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPConv) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, 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(PEPConv) >= 4 * PyLong_SHIFT) {
                            return (PEPConv) (((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)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 (PEPConv) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPConv) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPConv, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPConv) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPConv, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPConv) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPConv, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPConv,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPConv) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPConv) (((PEPConv)-1)*(((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPConv) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPConv) ((((((PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPConv) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPConv) (((PEPConv)-1)*(((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPConv) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPConv) ((((((((PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPConv) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, 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(PEPConv) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPConv) (((PEPConv)-1)*(((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPConv) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPConv, 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(PEPConv) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPConv) ((((((((((PEPConv)digits[3]) << PyLong_SHIFT) | (PEPConv)digits[2]) << PyLong_SHIFT) | (PEPConv)digits[1]) << PyLong_SHIFT) | (PEPConv)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPConv) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPConv, long, PyLong_AsLong(x))
            } else if (sizeof(PEPConv) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPConv, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPConv 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 (PEPConv) -1;
        }
    } else {
        PEPConv val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPConv) -1;
        val = __Pyx_PyInt_As_PEPConv(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPConv");
    return (PEPConv) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPConv");
    return (PEPConv) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPRefine __Pyx_PyInt_As_PEPRefine(PyObject *x) {
    const PEPRefine neg_one = (PEPRefine) -1, const_zero = (PEPRefine) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPRefine) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPRefine, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPRefine) 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 (PEPRefine) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPRefine, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPRefine) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) >= 2 * PyLong_SHIFT) {
                            return (PEPRefine) (((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPRefine) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) >= 3 * PyLong_SHIFT) {
                            return (PEPRefine) (((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPRefine) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, 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(PEPRefine) >= 4 * PyLong_SHIFT) {
                            return (PEPRefine) (((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)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 (PEPRefine) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPRefine) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPRefine) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPRefine) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPRefine, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPRefine,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPRefine) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPRefine) (((PEPRefine)-1)*(((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPRefine) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPRefine) ((((((PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPRefine) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPRefine) (((PEPRefine)-1)*(((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPRefine) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPRefine) ((((((((PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPRefine) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, 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(PEPRefine) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPRefine) (((PEPRefine)-1)*(((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPRefine) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefine, 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(PEPRefine) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPRefine) ((((((((((PEPRefine)digits[3]) << PyLong_SHIFT) | (PEPRefine)digits[2]) << PyLong_SHIFT) | (PEPRefine)digits[1]) << PyLong_SHIFT) | (PEPRefine)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPRefine) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, long, PyLong_AsLong(x))
            } else if (sizeof(PEPRefine) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefine, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPRefine 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 (PEPRefine) -1;
        }
    } else {
        PEPRefine val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPRefine) -1;
        val = __Pyx_PyInt_As_PEPRefine(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPRefine");
    return (PEPRefine) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPRefine");
    return (PEPRefine) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPRefineScheme __Pyx_PyInt_As_PEPRefineScheme(PyObject *x) {
    const PEPRefineScheme neg_one = (PEPRefineScheme) -1, const_zero = (PEPRefineScheme) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPRefineScheme) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPRefineScheme) 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 (PEPRefineScheme) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPRefineScheme) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) >= 2 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPRefineScheme) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) >= 3 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPRefineScheme) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, 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(PEPRefineScheme) >= 4 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)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 (PEPRefineScheme) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPRefineScheme) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPRefineScheme) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPRefineScheme) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPRefineScheme,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPRefineScheme) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPRefineScheme) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPRefineScheme) ((((((PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPRefineScheme) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPRefineScheme) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPRefineScheme) ((((((((PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPRefineScheme) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, 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(PEPRefineScheme) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPRefineScheme) (((PEPRefineScheme)-1)*(((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPRefineScheme) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPRefineScheme, 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(PEPRefineScheme) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPRefineScheme) ((((((((((PEPRefineScheme)digits[3]) << PyLong_SHIFT) | (PEPRefineScheme)digits[2]) << PyLong_SHIFT) | (PEPRefineScheme)digits[1]) << PyLong_SHIFT) | (PEPRefineScheme)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPRefineScheme) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, long, PyLong_AsLong(x))
            } else if (sizeof(PEPRefineScheme) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPRefineScheme, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPRefineScheme 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 (PEPRefineScheme) -1;
        }
    } else {
        PEPRefineScheme val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPRefineScheme) -1;
        val = __Pyx_PyInt_As_PEPRefineScheme(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPRefineScheme");
    return (PEPRefineScheme) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPRefineScheme");
    return (PEPRefineScheme) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPScale __Pyx_PyInt_As_PEPScale(PyObject *x) {
    const PEPScale neg_one = (PEPScale) -1, const_zero = (PEPScale) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPScale) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPScale, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPScale) 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 (PEPScale) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPScale, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPScale) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) >= 2 * PyLong_SHIFT) {
                            return (PEPScale) (((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPScale) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) >= 3 * PyLong_SHIFT) {
                            return (PEPScale) (((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPScale) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, 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(PEPScale) >= 4 * PyLong_SHIFT) {
                            return (PEPScale) (((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)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 (PEPScale) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPScale) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPScale, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPScale) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPScale, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPScale) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPScale, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPScale,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPScale) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPScale) (((PEPScale)-1)*(((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPScale) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPScale) ((((((PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPScale) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPScale) (((PEPScale)-1)*(((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPScale) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPScale) ((((((((PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPScale) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, 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(PEPScale) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPScale) (((PEPScale)-1)*(((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPScale) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPScale, 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(PEPScale) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPScale) ((((((((((PEPScale)digits[3]) << PyLong_SHIFT) | (PEPScale)digits[2]) << PyLong_SHIFT) | (PEPScale)digits[1]) << PyLong_SHIFT) | (PEPScale)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPScale) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPScale, long, PyLong_AsLong(x))
            } else if (sizeof(PEPScale) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPScale, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPScale 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 (PEPScale) -1;
        }
    } else {
        PEPScale val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPScale) -1;
        val = __Pyx_PyInt_As_PEPScale(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPScale");
    return (PEPScale) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPScale");
    return (PEPScale) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE PEPErrorType __Pyx_PyInt_As_PEPErrorType(PyObject *x) {
    const PEPErrorType neg_one = (PEPErrorType) -1, const_zero = (PEPErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(PEPErrorType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(PEPErrorType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (PEPErrorType) 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 (PEPErrorType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(PEPErrorType, digit, digits[0])
                case 2:
                    if (8 * sizeof(PEPErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) >= 2 * PyLong_SHIFT) {
                            return (PEPErrorType) (((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) >= 3 * PyLong_SHIFT) {
                            return (PEPErrorType) (((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, 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(PEPErrorType) >= 4 * PyLong_SHIFT) {
                            return (PEPErrorType) (((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)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 (PEPErrorType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(PEPErrorType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(PEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (PEPErrorType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(PEPErrorType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(PEPErrorType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(PEPErrorType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPErrorType) (((PEPErrorType)-1)*(((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(PEPErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (PEPErrorType) ((((((PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(PEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPErrorType) (((PEPErrorType)-1)*(((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(PEPErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (PEPErrorType) ((((((((PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(PEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, 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(PEPErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPErrorType) (((PEPErrorType)-1)*(((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(PEPErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(PEPErrorType, 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(PEPErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (PEPErrorType) ((((((((((PEPErrorType)digits[3]) << PyLong_SHIFT) | (PEPErrorType)digits[2]) << PyLong_SHIFT) | (PEPErrorType)digits[1]) << PyLong_SHIFT) | (PEPErrorType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(PEPErrorType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, long, PyLong_AsLong(x))
            } else if (sizeof(PEPErrorType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(PEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            PEPErrorType 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 (PEPErrorType) -1;
        }
    } else {
        PEPErrorType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (PEPErrorType) -1;
        val = __Pyx_PyInt_As_PEPErrorType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PEPErrorType");
    return (PEPErrorType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PEPErrorType");
    return (PEPErrorType) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE NEPWhich __Pyx_PyInt_As_NEPWhich(PyObject *x) {
    const NEPWhich neg_one = (NEPWhich) -1, const_zero = (NEPWhich) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(NEPWhich) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(NEPWhich, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (NEPWhich) 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 (NEPWhich) 0;
                case  1: __PYX_VERIFY_RETURN_INT(NEPWhich, digit, digits[0])
                case 2:
                    if (8 * sizeof(NEPWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) >= 2 * PyLong_SHIFT) {
                            return (NEPWhich) (((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NEPWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) >= 3 * PyLong_SHIFT) {
                            return (NEPWhich) (((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NEPWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, 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(NEPWhich) >= 4 * PyLong_SHIFT) {
                            return (NEPWhich) (((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)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 (NEPWhich) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(NEPWhich) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(NEPWhich) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (NEPWhich) 0;
                case -1: __PYX_VERIFY_RETURN_INT(NEPWhich, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(NEPWhich,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(NEPWhich) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (NEPWhich) (((NEPWhich)-1)*(((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(NEPWhich) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) {
                            return (NEPWhich) ((((((NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(NEPWhich) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (NEPWhich) (((NEPWhich)-1)*(((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NEPWhich) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) {
                            return (NEPWhich) ((((((((NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(NEPWhich) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, 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(NEPWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (NEPWhich) (((NEPWhich)-1)*(((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NEPWhich) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPWhich, 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(NEPWhich) - 1 > 4 * PyLong_SHIFT) {
                            return (NEPWhich) ((((((((((NEPWhich)digits[3]) << PyLong_SHIFT) | (NEPWhich)digits[2]) << PyLong_SHIFT) | (NEPWhich)digits[1]) << PyLong_SHIFT) | (NEPWhich)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(NEPWhich) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, long, PyLong_AsLong(x))
            } else if (sizeof(NEPWhich) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPWhich, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            NEPWhich 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 (NEPWhich) -1;
        }
    } else {
        NEPWhich val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (NEPWhich) -1;
        val = __Pyx_PyInt_As_NEPWhich(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to NEPWhich");
    return (NEPWhich) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to NEPWhich");
    return (NEPWhich) -1;
}

/* CIntFromPy */
          static CYTHON_INLINE NEPErrorType __Pyx_PyInt_As_NEPErrorType(PyObject *x) {
    const NEPErrorType neg_one = (NEPErrorType) -1, const_zero = (NEPErrorType) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(NEPErrorType) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(NEPErrorType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (NEPErrorType) 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 (NEPErrorType) 0;
                case  1: __PYX_VERIFY_RETURN_INT(NEPErrorType, digit, digits[0])
                case 2:
                    if (8 * sizeof(NEPErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) >= 2 * PyLong_SHIFT) {
                            return (NEPErrorType) (((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NEPErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) >= 3 * PyLong_SHIFT) {
                            return (NEPErrorType) (((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NEPErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, 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(NEPErrorType) >= 4 * PyLong_SHIFT) {
                            return (NEPErrorType) (((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)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 (NEPErrorType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(NEPErrorType) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(NEPErrorType) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (NEPErrorType) 0;
                case -1: __PYX_VERIFY_RETURN_INT(NEPErrorType, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(NEPErrorType,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(NEPErrorType) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (NEPErrorType) (((NEPErrorType)-1)*(((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(NEPErrorType) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                            return (NEPErrorType) ((((((NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(NEPErrorType) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (NEPErrorType) (((NEPErrorType)-1)*(((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(NEPErrorType) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                            return (NEPErrorType) ((((((((NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(NEPErrorType) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, 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(NEPErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (NEPErrorType) (((NEPErrorType)-1)*(((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(NEPErrorType) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(NEPErrorType, 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(NEPErrorType) - 1 > 4 * PyLong_SHIFT) {
                            return (NEPErrorType) ((((((((((NEPErrorType)digits[3]) << PyLong_SHIFT) | (NEPErrorType)digits[2]) << PyLong_SHIFT) | (NEPErrorType)digits[1]) << PyLong_SHIFT) | (NEPErrorType)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(NEPErrorType) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, long, PyLong_AsLong(x))
            } else if (sizeof(NEPErrorType) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(NEPErrorType, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            NEPErrorType 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 (NEPErrorType) -1;
        }
    } else {
        NEPErrorType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (NEPErrorType) -1;
        val = __Pyx_PyInt_As_NEPErrorType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to NEPErrorType");
    return (NEPErrorType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to NEPErrorType");
    return (NEPErrorType) -1;
}

/* 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))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } 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))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#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;
}

/* 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;
}

/* FunctionExport */
          static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* TypeImport */
          #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* FunctionImport */
          #ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* 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;
        ++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 char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__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)) {
#if PY_VERSION_HEX < 0x03030000
        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
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (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
    } 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 CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  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_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
